Merge "GLFunctorDrawable: skip alpha filtering" into tm-dev am: ec839b2eb8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17697994 Change-Id: Ib3954e059ec5ca720df49962c5fb13d30fe00707 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -61,6 +61,17 @@ void GLFunctorDrawable::onDraw(SkCanvas* canvas) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// canvas may be an AlphaFilterCanvas, which is intended to draw with a
|
||||||
|
// modified alpha. We do not have a way to do this without drawing into an
|
||||||
|
// extra layer, which would have a performance cost. Draw directly into the
|
||||||
|
// underlying gpu canvas. This matches prior behavior and the behavior in
|
||||||
|
// Vulkan.
|
||||||
|
{
|
||||||
|
auto* gpuCanvas = SkAndroidFrameworkUtils::getBaseWrappedCanvas(canvas);
|
||||||
|
LOG_ALWAYS_FATAL_IF(!gpuCanvas, "GLFunctorDrawable::onDraw is using an invalid canvas!");
|
||||||
|
canvas = gpuCanvas;
|
||||||
|
}
|
||||||
|
|
||||||
// flush will create a GrRenderTarget if not already present.
|
// flush will create a GrRenderTarget if not already present.
|
||||||
canvas->flush();
|
canvas->flush();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user