Index: include/gpu/GrContext.h |
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
index 39f5be728f85b171920d841b842f69791905fa77..82b48bdc234b231716b3865f35ed111acc0703c5 100644 |
--- a/include/gpu/GrContext.h |
+++ b/include/gpu/GrContext.h |
@@ -49,10 +49,21 @@ class SK_API GrContext : public SkRefCnt { |
public: |
SK_DECLARE_INST_COUNT(GrContext) |
+ struct Options { |
robertphillips
2014/08/11 21:36:31
For now we can just have this all on one line.
krajcevski
2014/08/12 14:17:49
Done.
|
+ Options() |
+ : fDrawPathToCompressedTexture(false) |
+ { } |
+ |
+ // 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 +950,12 @@ public: |
GrPathRendererChain::DrawType drawType = GrPathRendererChain::kColor_DrawType, |
GrPathRendererChain::StencilSupport* stencilSupport = NULL); |
+ /** |
robertphillips
2014/08/11 21:36:31
"a copy of the GrContext::Options that was passed"
krajcevski
2014/08/12 14:17:49
Done.
|
+ * This returns the GrContext::Options (value not reference) that was passed to the |
+ * constructor of this class. |
+ */ |
+ const Options& getOptions() const { return fOptions; } |
+ |
#if GR_CACHE_STATS |
void printCacheStats() const; |
#endif |
@@ -987,7 +1004,9 @@ private: |
int fMaxTextureSizeOverride; |
- GrContext(); // init must be called after the constructor. |
+ const Options fOptions; |
+ |
+ GrContext(const Options&); // init must be called after the constructor. |
bool init(GrBackend, GrBackendContext); |
void setupDrawBuffer(); |