| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "DMSrcSink.h" | 8 #include "DMSrcSink.h" |
| 9 #include "SkAndroidCodec.h" | 9 #include "SkAndroidCodec.h" |
| 10 #include "SkCodec.h" | 10 #include "SkCodec.h" |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 GrContextFactory::GLContextOptions options, | 824 GrContextFactory::GLContextOptions options, |
| 825 int samples, | 825 int samples, |
| 826 bool diText, | 826 bool diText, |
| 827 bool threaded) | 827 bool threaded) |
| 828 : fContextType(ct) | 828 : fContextType(ct) |
| 829 , fContextOptions(options) | 829 , fContextOptions(options) |
| 830 , fSampleCount(samples) | 830 , fSampleCount(samples) |
| 831 , fUseDIText(diText) | 831 , fUseDIText(diText) |
| 832 , fThreaded(threaded) {} | 832 , fThreaded(threaded) {} |
| 833 | 833 |
| 834 int GPUSink::enclave() const { | |
| 835 return fThreaded ? kAnyThread_Enclave : kGPU_Enclave; | |
| 836 } | |
| 837 | |
| 838 void PreAbandonGpuContextErrorHandler(SkError, void*) {} | 834 void PreAbandonGpuContextErrorHandler(SkError, void*) {} |
| 839 | 835 |
| 840 DEFINE_bool(imm, false, "Run gpu configs in immediate mode."); | 836 DEFINE_bool(imm, false, "Run gpu configs in immediate mode."); |
| 841 DEFINE_bool(batchClip, false, "Clip each GrBatch to its device bounds for testin
g."); | 837 DEFINE_bool(batchClip, false, "Clip each GrBatch to its device bounds for testin
g."); |
| 842 DEFINE_bool(batchBounds, false, "Draw a wireframe bounds of each GrBatch."); | 838 DEFINE_bool(batchBounds, false, "Draw a wireframe bounds of each GrBatch."); |
| 843 DEFINE_int32(batchLookback, -1, "Maximum GrBatch lookback for combining, negativ
e means default."); | 839 DEFINE_int32(batchLookback, -1, "Maximum GrBatch lookback for combining, negativ
e means default."); |
| 844 | 840 |
| 845 Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co
nst { | 841 Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co
nst { |
| 846 GrContextOptions grOptions; | 842 GrContextOptions grOptions; |
| 847 grOptions.fImmediateMode = FLAGS_imm; | 843 grOptions.fImmediateMode = FLAGS_imm; |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 skr.visit<void>(i, drawsAsSingletonPictures); | 1386 skr.visit<void>(i, drawsAsSingletonPictures); |
| 1391 } | 1387 } |
| 1392 SkAutoTUnref<SkPicture> macroPic(macroRec.endRecordingAsPicture()); | 1388 SkAutoTUnref<SkPicture> macroPic(macroRec.endRecordingAsPicture()); |
| 1393 | 1389 |
| 1394 canvas->drawPicture(macroPic); | 1390 canvas->drawPicture(macroPic); |
| 1395 return check_against_reference(bitmap, src, fSink); | 1391 return check_against_reference(bitmap, src, fSink); |
| 1396 }); | 1392 }); |
| 1397 } | 1393 } |
| 1398 | 1394 |
| 1399 } // namespace DM | 1395 } // namespace DM |
| OLD | NEW |