Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: src/gpu/GrGpu.cpp

Issue 2238563002: Fix 4444 on Vulkan devices who don't support RGBA_4444 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update comment Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/vk/GrVkCaps.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 7199b4d97694c62ba0555acf0a1b65939474459f..e14e8929b04bbc84de2fa52f14298befac2733c2 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -277,6 +277,12 @@ bool GrGpu::getReadPixelsInfo(GrSurface* srcSurface, int width, int height, size
return false;
}
+ // We currently do not support reading into the packed formats 565 or 4444 as they are not
+ // required to have read back support on all devices and backends.
+ if (kRGB_565_GrPixelConfig == readConfig || kRGBA_4444_GrPixelConfig == readConfig) {
+ return false;
+ }
+
if (!this->onGetReadPixelsInfo(srcSurface, width, height, rowBytes, readConfig, drawPreference,
tempDrawInfo)) {
return false;
« no previous file with comments | « no previous file | src/gpu/vk/GrVkCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698