Fixed issue where HardwareBufferRenderer was not preserving contents
Updated RenderProxy creation to pass false for the opaque flag in order to avoid an unnecessary canvas->clear invocation within SkiaPipeline::draw Fixes: 275398000 Test: Added test to HardwareBufferRendererTests Change-Id: I5f884240439bf3e57500ed1404f31fbe2ea122fa
This commit is contained in:
@@ -74,7 +74,7 @@ static long android_graphics_HardwareBufferRenderer_create(JNIEnv* env, jobject,
|
||||
auto* hardwareBuffer = HardwareBufferHelpers::AHardwareBuffer_fromHardwareBuffer(env, buffer);
|
||||
auto* rootRenderNode = reinterpret_cast<RootRenderNode*>(renderNodePtr);
|
||||
ContextFactoryImpl factory(rootRenderNode);
|
||||
auto* proxy = new RenderProxy(true, rootRenderNode, &factory);
|
||||
auto* proxy = new RenderProxy(false, rootRenderNode, &factory);
|
||||
proxy->setHardwareBuffer(hardwareBuffer);
|
||||
return (jlong)proxy;
|
||||
}
|
||||
|
||||
@@ -499,8 +499,7 @@ void SkiaPipeline::renderFrameImpl(const SkRect& clip,
|
||||
}
|
||||
canvas->concat(preTransform);
|
||||
|
||||
// STOPSHIP: Revert, temporary workaround to clear always F16 frame buffer for b/74976293
|
||||
if (!opaque || getSurfaceColorType() == kRGBA_F16_SkColorType) {
|
||||
if (!opaque) {
|
||||
canvas->clear(SK_ColorTRANSPARENT);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user