Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 090a24d86a62590f123881274578b0468e59a01d..9859ef99985749f772ba49b1eeb6f100e97e5d7c 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -57,6 +57,11 @@ Name GMSrc::name() const { |
return gm->getName(); |
} |
robertphillips
2015/05/27 18:28:31
Would getGrContextOptions make more sense ?
bsalomon
2015/05/27 20:17:33
Maybe modify is more accurate, since it is in/out.
|
+void GMSrc::setGrContextOptions(GrContextOptions* options) const { |
+ SkAutoTDelete<skiagm::GM> gm(fFactory(NULL)); |
robertphillips
2015/05/27 18:28:31
return of void ?
bsalomon
2015/05/27 20:17:33
Done.
|
+ return gm->setGrContextOptions(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.setGrContextOptions(&options); |
+ |
+ GrContextFactory factory(options); |
const SkISize size = src.size(); |
const SkImageInfo info = |
SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul_SkAlphaType); |