Chromium Code Reviews| Index: include/gpu/GrContext.h |
| diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
| index 39f5be728f85b171920d841b842f69791905fa77..f5f0930bb0513d59504bb2c57ffda5c4102255a9 100644 |
| --- a/include/gpu/GrContext.h |
| +++ b/include/gpu/GrContext.h |
| @@ -49,10 +49,15 @@ class SK_API GrContext : public SkRefCnt { |
| public: |
| SK_DECLARE_INST_COUNT(GrContext) |
| + struct Options { |
| + Options(); |
| + bool fDrawPathToCompressedTexture; |
|
bsalomon
2014/08/11 19:00:47
Should we label this field experimental or somethi
krajcevski
2014/08/11 19:09:55
Done.
|
| + }; |
| + |
| /** |
| * Creates a GrContext for a backend context. |
| */ |
| - static GrContext* Create(GrBackend, GrBackendContext); |
| + static GrContext* Create(GrBackend, GrBackendContext, const Options* opts = NULL); |
| virtual ~GrContext(); |
| @@ -322,6 +327,14 @@ public: |
| */ |
| void setMaxTextureSizeOverride(int maxTextureSizeOverride); |
| + /** |
| + * 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. |
| + */ |
| + bool supportsDrawPathToCompressedTexture() const; |
|
bsalomon
2014/08/11 19:00:47
Does this need to be public? It feels like we're e
krajcevski
2014/08/11 19:09:55
I moved it to the "for internal use only" section.
|
| + |
| /////////////////////////////////////////////////////////////////////////// |
| // Render targets |
| @@ -986,9 +999,10 @@ private: |
| SkTDArray<CleanUpData> fCleanUpData; |
| int fMaxTextureSizeOverride; |
| + bool fSupportsDrawPathToCompressed; |
| GrContext(); // init must be called after the constructor. |
| - bool init(GrBackend, GrBackendContext); |
| + bool init(GrBackend, GrBackendContext, const Options& opts); |
| void setupDrawBuffer(); |