| Index: dm/DMSrcSink.cpp
|
| diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
|
| index 6e039236aad48872c6db23c340fea4a06d32d999..26ba13b5476b165edc0c9aa1ce309224cfb1da7a 100644
|
| --- a/dm/DMSrcSink.cpp
|
| +++ b/dm/DMSrcSink.cpp
|
| @@ -789,14 +789,12 @@
|
| DEFINE_bool(gpuStats, false, "Append GPU stats to the log for each GPU task?");
|
|
|
| GPUSink::GPUSink(GrContextFactory::GLContextType ct,
|
| - GrContextFactory::GLContextOptions options,
|
| - GrGLStandard gpuAPI,
|
| + GrGLStandard api,
|
| int samples,
|
| bool diText,
|
| bool threaded)
|
| : fContextType(ct)
|
| - , fContextOptions(options)
|
| - , fGpuAPI(gpuAPI)
|
| + , fGpuAPI(api)
|
| , fSampleCount(samples)
|
| , fUseDIText(diText)
|
| , fThreaded(threaded) {}
|
| @@ -812,26 +810,24 @@
|
| DEFINE_bool(batchBounds, false, "Draw a wireframe bounds of each GrBatch.");
|
|
|
| Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) const {
|
| - GrContextOptions grOptions;
|
| + GrContextOptions options;
|
| if (FLAGS_imm) {
|
| - grOptions.fImmediateMode = true;
|
| + options.fImmediateMode = true;
|
| }
|
| if (FLAGS_batchClip) {
|
| - grOptions.fClipBatchToBounds = true;
|
| - }
|
| -
|
| + options.fClipBatchToBounds = true;
|
| + }
|
| if (FLAGS_batchBounds) {
|
| - grOptions.fDrawBatchBounds = true;
|
| - }
|
| - src.modifyGrContextOptions(&grOptions);
|
| -
|
| - GrContextFactory factory(grOptions);
|
| + options.fDrawBatchBounds = true;
|
| + }
|
| + src.modifyGrContextOptions(&options);
|
| +
|
| + GrContextFactory factory(options);
|
| const SkISize size = src.size();
|
| const SkImageInfo info =
|
| SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul_SkAlphaType);
|
| SkAutoTUnref<SkSurface> surface(
|
| - NewGpuSurface(&factory, fContextType, fContextOptions, fGpuAPI, info, fSampleCount,
|
| - fUseDIText));
|
| + NewGpuSurface(&factory, fContextType, fGpuAPI, info, fSampleCount, fUseDIText));
|
| if (!surface) {
|
| return "Could not create a surface.";
|
| }
|
|
|