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

Unified Diff: include/gpu/GrContext.h

Issue 1149773005: Add direct getter for GrCaps to GrContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init caps in the right place 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 | « bench/nanobench.cpp ('k') | src/core/SkPictureShader.cpp » ('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 8c5f09f7365eb6fe8aaabc5469814d46f9302977..acd7b1ad911ee3e1ce92d5f40a8e846fdc66f243 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -20,6 +20,7 @@
class GrAARectRenderer;
class GrBatchFontCache;
+class GrCaps;
struct GrContextOptions;
class GrDrawContext;
class GrDrawTarget;
@@ -155,45 +156,8 @@ public:
*/
void purgeAllUnlockedResources();
- //////////////////////////////////////////////////////////////////////////
- /// Texture and Render Target Queries
-
- /**
- * Are shader derivatives supported?
- */
- bool shaderDerivativeSupport() const;
-
- /**
- * Can the provided configuration act as a texture?
- */
- bool isConfigTexturable(GrPixelConfig) const;
-
- /**
- * Can non-power-of-two textures be used with tile modes other than clamp?
- */
- bool npotTextureTileSupport() const;
-
- /**
- * Return the max width or height of a texture supported by the current GPU.
- */
- int getMaxTextureSize() const;
-
- /**
- * Can the provided configuration act as a color render target?
- */
- bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const;
-
- /**
- * Return the max width or height of a render target supported by the
- * current GPU.
- */
- int getMaxRenderTargetSize() const;
-
- /**
- * Returns the max sample count for a render target. It will be 0 if MSAA
- * is not supported.
- */
- int getMaxSampleCount() const;
+ /** Access the context capabilities */
+ const GrCaps* caps() const { return fCaps; }
/**
* Returns the recommended sample count for a render target when using this
@@ -392,6 +356,7 @@ public:
private:
GrGpu* fGpu;
+ const GrCaps* fCaps;
GrResourceCache* fResourceCache;
// this union exists because the inheritance of GrTextureProvider->GrResourceProvider
// is in a private header.
« no previous file with comments | « bench/nanobench.cpp ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698