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

Unified Diff: dm/DMSrcSink.cpp

Issue 1158963002: Add caps overrides to GMs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments 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 | « dm/DMSrcSink.h ('k') | gm/bleed.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « dm/DMSrcSink.h ('k') | gm/bleed.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698