Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 090a24d86a62590f123881274578b0468e59a01d..20b3e078fd9469ed7a98b2c1aeeb2b520b0cdc86 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -57,6 +57,11 @@ Name GMSrc::name() const { |
return gm->getName(); |
} |
+void GMSrc::modifyGrContextOptions(GrContextOptions* options) const { |
+ SkAutoTDelete<skiagm::GM> gm(fFactory(NULL)); |
+ gm->modifyGrContextOptions(options); |
+} |
+ |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
CodecSrc::CodecSrc(Path path, Mode mode, DstColorType dstColorType) |
@@ -340,7 +345,10 @@ int GPUSink::enclave() const { |
void PreAbandonGpuContextErrorHandler(SkError, void*) {} |
Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) const { |
- GrContextFactory factory; |
+ GrContextOptions options; |
+ src.modifyGrContextOptions(&options); |
+ |
+ GrContextFactory factory(options); |
const SkISize size = src.size(); |
const SkImageInfo info = |
SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul_SkAlphaType); |