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

Unified Diff: src/gpu/GrTest.cpp

Issue 1563443002: Move config texturability/renderability to config table (Closed) Base URL: https://skia.googlesource.com/skia.git@readpixformat
Patch Set: whitespace cleanup Created 4 years, 11 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 | « src/gpu/GrCaps.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTest.cpp
diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp
index 03a8d54a6d999f135435d26070925e1895e35dae..2a2dc955101fd380fbb50fd5bc7ca90edc3c6aba 100644
--- a/src/gpu/GrTest.cpp
+++ b/src/gpu/GrTest.cpp
@@ -258,10 +258,19 @@ void GrResourceCache::changeTimestamp(uint32_t newTimestamp) { fTimestamp = newT
class GrPipeline;
+class MockCaps : public GrCaps {
+public:
+ explicit MockCaps(const GrContextOptions& options) : INHERITED(options) {}
+ bool isConfigTexturable(GrPixelConfig config) const override { return false; }
+ bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override { return false; }
+private:
+ typedef GrCaps INHERITED;
+};
+
class MockGpu : public GrGpu {
public:
MockGpu(GrContext* context, const GrContextOptions& options) : INHERITED(context) {
- fCaps.reset(new GrCaps(options));
+ fCaps.reset(new MockCaps(options));
}
~MockGpu() override {}
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698