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

Unified Diff: include/gpu/GrContext.h

Issue 1158433006: Store context options on caps. (Closed) Base URL: https://skia.googlesource.com/skia.git@onecaps
Patch Set: remove case statement accidentally checked in Created 5 years, 7 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 | « include/gpu/GrCaps.h ('k') | include/gpu/GrContextOptions.h » ('j') | no next file with comments »
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 a6fdf75d893be2f8b8dc42499722df6732aa571c..b6fef3d80c3baca0d156776b9d3ebeb44137fbef 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -20,6 +20,7 @@
class GrAARectRenderer;
class GrBatchFontCache;
+struct GrContextOptions;
class GrDrawTarget;
class GrFragmentProcessor;
class GrGpu;
@@ -46,20 +47,11 @@ class SK_API GrContext : public SkRefCnt {
public:
SK_DECLARE_INST_COUNT(GrContext)
- struct Options {
- Options() : fDrawPathToCompressedTexture(false), fSuppressPrints(false) { }
-
- // EXPERIMENTAL
- // May be removed in the future, or may become standard depending
- // on the outcomes of a variety of internal tests.
- bool fDrawPathToCompressedTexture;
- bool fSuppressPrints;
- };
-
/**
* Creates a GrContext for a backend context.
*/
- static GrContext* Create(GrBackend, GrBackendContext, const Options* opts = NULL);
+ static GrContext* Create(GrBackend, GrBackendContext, const GrContextOptions& options);
+ static GrContext* Create(GrBackend, GrBackendContext);
/**
* Only defined in test apps.
@@ -530,7 +522,6 @@ public:
GrResourceProvider* resourceProvider() { return fResourceProvider; }
const GrResourceProvider* resourceProvider() const { return fResourceProvider; }
GrResourceCache* getResourceCache() { return fResourceCache; }
- bool suppressPrints() const { return fOptions.fSuppressPrints; }
// Called by tests that draw directly to the context via GrDrawTarget
void getTestTarget(GrTestTarget*);
@@ -548,12 +539,6 @@ public:
GrPathRendererChain::DrawType drawType = GrPathRendererChain::kColor_DrawType,
GrPathRendererChain::StencilSupport* stencilSupport = NULL);
- /**
- * This returns a copy of the the GrContext::Options that was passed to the
- * constructor of this class.
- */
- const Options& getOptions() const { return fOptions; }
-
/** Prints cache stats to the string if GR_CACHE_STATS == 1. */
void dumpCacheStats(SkString*) const;
void printCacheStats() const;
@@ -599,11 +584,10 @@ private:
int fMaxTextureSizeOverride;
- const Options fOptions;
const uint32_t fUniqueID;
- GrContext(const Options&); // init must be called after the constructor.
- bool init(GrBackend, GrBackendContext);
+ GrContext(); // init must be called after the constructor.
+ bool init(GrBackend, GrBackendContext, const GrContextOptions& options);
void initMockContext();
void initCommon();
« no previous file with comments | « include/gpu/GrCaps.h ('k') | include/gpu/GrContextOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698