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(); |