Merge "Fix source crop that's being sent to hwc for sf caching" into sc-dev
diff --git a/libs/renderengine/skia/AutoBackendTexture.cpp b/libs/renderengine/skia/AutoBackendTexture.cpp
index 9ed759f..8ae69de 100644
--- a/libs/renderengine/skia/AutoBackendTexture.cpp
+++ b/libs/renderengine/skia/AutoBackendTexture.cpp
@@ -46,7 +46,7 @@
ALOGE_IF(!mBackendTexture.isValid(),
"Failed to create a valid texture. [%p]:[%d,%d] isProtected:%d isWriteable:%d "
"format:%d",
- this, desc.width, desc.height, isOutputBuffer, createProtectedImage, desc.format);
+ this, desc.width, desc.height, createProtectedImage, isOutputBuffer, desc.format);
}
void AutoBackendTexture::unref(bool releaseLocalResources) {
@@ -129,4 +129,4 @@
} // namespace skia
} // namespace renderengine
-} // namespace android
\ No newline at end of file
+} // namespace android
diff --git a/services/surfaceflinger/BufferLayer.cpp b/services/surfaceflinger/BufferLayer.cpp
index d243989..4c73b6e 100644
--- a/services/surfaceflinger/BufferLayer.cpp
+++ b/services/surfaceflinger/BufferLayer.cpp
@@ -186,7 +186,7 @@
}
}
const bool blackOutLayer = (isProtected() && !targetSettings.supportsProtectedContent) ||
- (isSecure() && !targetSettings.isSecure);
+ ((isSecure() || isProtected()) && !targetSettings.isSecure);
const bool bufferCanBeUsedAsHwTexture =
mBufferInfo.mBuffer->getBuffer()->getUsage() & GraphicBuffer::USAGE_HW_TEXTURE;
compositionengine::LayerFE::LayerSettings& layer = *result;