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

Unified Diff: include/gpu/GrContext.h

Issue 1164443002: Revert of Add direct getter for GrCaps to GrContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 acd7b1ad911ee3e1ce92d5f40a8e846fdc66f243..8c5f09f7365eb6fe8aaabc5469814d46f9302977 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -20,7 +20,6 @@
class GrAARectRenderer;
class GrBatchFontCache;
-class GrCaps;
struct GrContextOptions;
class GrDrawContext;
class GrDrawTarget;
@@ -156,8 +155,45 @@
*/
void purgeAllUnlockedResources();
- /** Access the context capabilities */
- const GrCaps* caps() const { return fCaps; }
+ //////////////////////////////////////////////////////////////////////////
+ /// 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;
/**
* Returns the recommended sample count for a render target when using this
@@ -356,7 +392,6 @@
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