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>
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index e70cae3..a499111 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -1223,14 +1223,14 @@
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 @@
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 @@
#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.";
}