diff options
author | csmartdalton <csmartdalton@google.com> | 2017-02-21 12:36:05 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-21 21:45:45 +0000 |
commit | e812d496aaa5e5e9f2117de8f442c297c9cb1367 (patch) | |
tree | 7342c7c6e048e3a226e162d7d1bcbf6ffbcddc55 /dm/DMSrcSink.cpp | |
parent | e026511f4c4b90bfe842f89966d088b663fc8c13 (diff) |
Rename GrContextFactory::ContextOptions to ContextOverrides
Also changes the behavior of these flags to only override their
corresponding context options when set, and to leave them unchanged
when not set.
BUG=skia:
Change-Id: I09f6be09997594fa888d9045dd4901354ef3f880
Reviewed-on: https://skia-review.googlesource.com/8780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'dm/DMSrcSink.cpp')
-rw-r--r-- | dm/DMSrcSink.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index e70cae31a4..a4991116ca 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -1223,14 +1223,14 @@ Error NullSink::draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const { DEFINE_bool(gpuStats, false, "Append GPU stats to the log for each GPU task?"); GPUSink::GPUSink(GrContextFactory::ContextType ct, - GrContextFactory::ContextOptions options, + GrContextFactory::ContextOverrides overrides, int samples, bool diText, SkColorType colorType, sk_sp<SkColorSpace> colorSpace, bool threaded) : fContextType(ct) - , fContextOptions(options) + , fContextOverrides(overrides) , fSampleCount(samples) , fUseDIText(diText) , fColorType(colorType) @@ -1257,7 +1257,7 @@ Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co SkImageInfo::Make(size.width(), size.height(), fColorType, kPremul_SkAlphaType, fColorSpace); #if SK_SUPPORT_GPU - GrContext* context = factory.getContextInfo(fContextType, fContextOptions).grContext(); + GrContext* context = factory.getContextInfo(fContextType, fContextOverrides).grContext(); const int maxDimension = context->caps()->maxTextureSize(); if (maxDimension < SkTMax(size.width(), size.height())) { return Error::Nonfatal("Src too large to create a texture.\n"); @@ -1265,7 +1265,7 @@ Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co #endif auto surface( - NewGpuSurface(&factory, fContextType, fContextOptions, info, fSampleCount, fUseDIText)); + NewGpuSurface(&factory, fContextType, fContextOverrides, info, fSampleCount, fUseDIText)); if (!surface) { return "Could not create a surface."; } |