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 "SamplePipeControllers.h" | 9 #include "SamplePipeControllers.h" |
10 #include "SkAndroidCodec.h" | 10 #include "SkAndroidCodec.h" |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 | 878 |
879 int GPUSink::enclave() const { | 879 int GPUSink::enclave() const { |
880 return fThreaded ? kAnyThread_Enclave : kGPU_Enclave; | 880 return fThreaded ? kAnyThread_Enclave : kGPU_Enclave; |
881 } | 881 } |
882 | 882 |
883 void PreAbandonGpuContextErrorHandler(SkError, void*) {} | 883 void PreAbandonGpuContextErrorHandler(SkError, void*) {} |
884 | 884 |
885 DEFINE_bool(imm, false, "Run gpu configs in immediate mode."); | 885 DEFINE_bool(imm, false, "Run gpu configs in immediate mode."); |
886 | 886 |
887 Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co
nst { | 887 Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co
nst { |
| 888 |
| 889 SkString name = src.name(); |
| 890 const char* pcName = name.c_str(); |
| 891 pcName; |
| 892 |
888 GrContextOptions options; | 893 GrContextOptions options; |
889 if (FLAGS_imm) { | 894 if (FLAGS_imm) { |
890 options.fImmediateMode = true; | 895 options.fImmediateMode = true; |
891 } | 896 } |
892 src.modifyGrContextOptions(&options); | 897 src.modifyGrContextOptions(&options); |
893 | 898 |
894 GrContextFactory factory(options); | 899 GrContextFactory factory(options); |
895 const SkISize size = src.size(); | 900 const SkISize size = src.size(); |
896 const SkImageInfo info = | 901 const SkImageInfo info = |
897 SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul
_SkAlphaType); | 902 SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul
_SkAlphaType); |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 skr.visit<void>(i, drawsAsSingletonPictures); | 1338 skr.visit<void>(i, drawsAsSingletonPictures); |
1334 } | 1339 } |
1335 SkAutoTUnref<SkPicture> macroPic(macroRec.endRecordingAsPicture()); | 1340 SkAutoTUnref<SkPicture> macroPic(macroRec.endRecordingAsPicture()); |
1336 | 1341 |
1337 canvas->drawPicture(macroPic); | 1342 canvas->drawPicture(macroPic); |
1338 return ""; | 1343 return ""; |
1339 }); | 1344 }); |
1340 } | 1345 } |
1341 | 1346 |
1342 } // namespace DM | 1347 } // namespace DM |
OLD | NEW |