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

Unified Diff: src/gpu/GrTest.cpp

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 | « src/gpu/GrSWMaskHelper.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 0801d03a6c59c31a10ab4266dca935be0b1bc1a1..8580661fd34c62fb3fb17d43e7cd136be27b9466 100644
--- a/src/gpu/GrTest.cpp
+++ b/src/gpu/GrTest.cpp
@@ -7,6 +7,7 @@
*/
#include "GrTest.h"
+#include "GrContextOptions.h"
#include "GrGpuResourceCacheAccess.h"
#include "GrInOrderDrawBuffer.h"
@@ -138,7 +139,9 @@ class GrPipeline;
class MockGpu : public GrGpu {
public:
- MockGpu(GrContext* context) : INHERITED(context) { fCaps.reset(SkNEW(GrCaps)); }
+ MockGpu(GrContext* context, const GrContextOptions& options) : INHERITED(context) {
+ fCaps.reset(SkNEW_ARGS(GrCaps, (options)));
+ }
~MockGpu() override {}
bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const override {
return true;
@@ -249,15 +252,16 @@ private:
};
GrContext* GrContext::CreateMockContext() {
- GrContext* context = SkNEW_ARGS(GrContext, (Options()));
+ GrContext* context = SkNEW(GrContext);
context->initMockContext();
return context;
}
void GrContext::initMockContext() {
+ GrContextOptions options;
SkASSERT(NULL == fGpu);
- fGpu = SkNEW_ARGS(MockGpu, (this));
+ fGpu = SkNEW_ARGS(MockGpu, (this, options));
SkASSERT(fGpu);
this->initCommon();
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698