aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-02-14 14:15:48 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-14 20:42:06 +0000
commit46da1cc9f20c277f7789355038d426931195aa65 (patch)
tree4db2c96d3e6252165bd2e5bae9c1bf3ac6f3c5c3 /include/gpu
parent431815dcfb27d26aed11ab6445a9f49b00ebbedb (diff)
GrContext option to prevent GPU based YUV -> RGB
Rob and I spent a long time debugging why this wasn't working for Flutter - doing the more complex operations on the loading thread produces a blank texture when it's used later on the drawing thread. Limiting ourselves to just creating and uploading RGBA data fixes that. We need to debug what's going wrong, but in the meantime, this lets Flutter use Skia APIs to manage GPU uploading and lifetime of texture-backed images, while still doing those uploads on their IO thread. BUG=skia: Change-Id: Ibf5c37f2439814544beab8c93c2a646f7a9e779d Reviewed-on: https://skia-review.googlesource.com/8443 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrContext.h1
-rw-r--r--include/gpu/GrContextOptions.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index f7bfd9a2e5..f268b8817a 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -394,6 +394,7 @@ private:
GrAtlasGlyphCache* fAtlasGlyphCache;
std::unique_ptr<GrTextBlobCache> fTextBlobCache;
+ bool fDisableGpuYUVConversion;
bool fDidTestPMConversions;
int fPMToUPMConversion;
int fUPMToPMConversion;
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index ac384703a3..a2e4288c66 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -85,6 +85,12 @@ struct GrContextOptions {
* sRGB support.
*/
bool fRequireDecodeDisableForSRGB = true;
+
+ /**
+ * If true, the GPU will not be used to perform YUV -> RGB conversion when generating
+ * textures from codec-backed images.
+ */
+ bool fDisableGpuYUVConversion = false;
};
#endif