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

Unified Diff: include/gpu/GrContext.h

Issue 459033002: Change GR_COMPRESS_ALPHA_MASK from compile-time flag to run-time flag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move things around a bit Created 6 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 | « gyp/gpu.gyp ('k') | src/gpu/GrContext.cpp » ('j') | src/gpu/GrContext.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 39f5be728f85b171920d841b842f69791905fa77..07434425f972486620fa03bb06a51fdfb15e8dde 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -49,10 +49,19 @@ class SK_API GrContext : public SkRefCnt {
public:
SK_DECLARE_INST_COUNT(GrContext)
+ struct Options {
+ Options();
+
+ // EXPERIMENTAL
+ // May be removed in the future, or may become standard depending
+ // on the outcomes of a variety of internal tests.
+ bool fDrawPathToCompressedTexture;
+ };
+
/**
* Creates a GrContext for a backend context.
*/
- static GrContext* Create(GrBackend, GrBackendContext);
+ static GrContext* Create(GrBackend, GrBackendContext, const Options* opts = NULL);
virtual ~GrContext();
@@ -939,6 +948,14 @@ public:
GrPathRendererChain::DrawType drawType = GrPathRendererChain::kColor_DrawType,
GrPathRendererChain::StencilSupport* stencilSupport = NULL);
+ /**
+ * This returns true if the underlying graphics device and system is
+ * capable of drawing paths to compressed textures. This generally provides
+ * a speedup on mobile devices with advanced GPUs, but it only gets turned
+ * on when there is a clear speedup benefit.
+ */
robertphillips 2014/08/11 19:22:20 drawPathsToCompressedTextures ? compressCoverageMa
krajcevski 2014/08/11 20:01:33 Done.
+ bool supportsDrawPathToCompressedTexture() const;
+
#if GR_CACHE_STATS
void printCacheStats() const;
#endif
@@ -986,9 +1003,10 @@ private:
SkTDArray<CleanUpData> fCleanUpData;
int fMaxTextureSizeOverride;
robertphillips 2014/08/11 19:22:20 Options fOptions; ?
krajcevski 2014/08/11 20:01:33 Done.
+ bool fSupportsDrawPathToCompressed;
GrContext(); // init must be called after the constructor.
- bool init(GrBackend, GrBackendContext);
+ bool init(GrBackend, GrBackendContext, const Options& opts);
void setupDrawBuffer();
« no previous file with comments | « gyp/gpu.gyp ('k') | src/gpu/GrContext.cpp » ('j') | src/gpu/GrContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698