summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2021-02-24 10:53:16 -0800
committer Alec Mouri <alecmouri@google.com> 2021-02-24 11:00:21 -0800
commitd354992d1cd148fe628b9478de7cbc3ba9fa49ca (patch)
tree2754d1b3d6ae9ea004b43187c002470adafebdcd
parentec1691271f4732807a21fd678bfddb3c7b25c3ae (diff)
Remove sampling usage bit requirement for output buffers
Skia RenderEngine hits a different path for creating SkSurfaces that does not enforce presence of the sampling bit, so we don't really need to enforce it here. Note that in practice the sampling bit may still be provided in anticipation of SF caching, so this is really just for tests/cleanup. Bug: 180650640 Test: First, patch out sampling usage bit in RenderSurface Test: boots Test: simulate secondary displays Test: force GPU composition Change-Id: I35558beec60b1c228e1fa0ad6382482869e1719c
-rw-r--r--libs/renderengine/skia/SkiaGLRenderEngine.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/libs/renderengine/skia/SkiaGLRenderEngine.cpp b/libs/renderengine/skia/SkiaGLRenderEngine.cpp
index 327b04c699..b676a3571a 100644
--- a/libs/renderengine/skia/SkiaGLRenderEngine.cpp
+++ b/libs/renderengine/skia/SkiaGLRenderEngine.cpp
@@ -404,10 +404,6 @@ bool SkiaGLRenderEngine::waitFence(base::unique_fd fenceFd) {
return true;
}
-static bool hasUsage(const AHardwareBuffer_Desc& desc, uint64_t usage) {
- return !!(desc.usage & usage);
-}
-
static float toDegrees(uint32_t transform) {
switch (transform) {
case ui::Transform::ROT_90:
@@ -586,8 +582,6 @@ status_t SkiaGLRenderEngine::drawLayers(const DisplaySettings& display,
auto& cache = mInProtectedContext ? mProtectedTextureCache : mTextureCache;
AHardwareBuffer_Desc bufferDesc;
AHardwareBuffer_describe(buffer->toAHardwareBuffer(), &bufferDesc);
- LOG_ALWAYS_FATAL_IF(!hasUsage(bufferDesc, AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE),
- "missing usage");
std::shared_ptr<AutoBackendTexture::LocalRef> surfaceTextureRef = nullptr;
if (useFramebufferCache) {