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 27 matching lines...) Expand all Loading... |
38 #endif | 38 #endif |
39 | 39 |
40 #ifdef SK_MOJO | 40 #ifdef SK_MOJO |
41 #include "SkMojo.mojom.h" | 41 #include "SkMojo.mojom.h" |
42 #endif | 42 #endif |
43 | 43 |
44 DEFINE_bool(multiPage, false, "For document-type backends, render the source" | 44 DEFINE_bool(multiPage, false, "For document-type backends, render the source" |
45 " into multiple pages"); | 45 " into multiple pages"); |
46 DEFINE_bool(RAW_threading, true, "Allow RAW decodes to run on multiple threads?"
); | 46 DEFINE_bool(RAW_threading, true, "Allow RAW decodes to run on multiple threads?"
); |
47 | 47 |
| 48 using sk_gpu_test::GrContextFactory; |
| 49 |
48 namespace DM { | 50 namespace DM { |
49 | 51 |
50 GMSrc::GMSrc(skiagm::GMRegistry::Factory factory) : fFactory(factory) {} | 52 GMSrc::GMSrc(skiagm::GMRegistry::Factory factory) : fFactory(factory) {} |
51 | 53 |
52 Error GMSrc::draw(SkCanvas* canvas) const { | 54 Error GMSrc::draw(SkCanvas* canvas) const { |
53 SkAutoTDelete<skiagm::GM> gm(fFactory(nullptr)); | 55 SkAutoTDelete<skiagm::GM> gm(fFactory(nullptr)); |
54 canvas->concat(gm->getInitialTransform()); | 56 canvas->concat(gm->getInitialTransform()); |
55 gm->draw(canvas); | 57 gm->draw(canvas); |
56 return ""; | 58 return ""; |
57 } | 59 } |
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1506 skr.visit(i, drawsAsSingletonPictures); | 1508 skr.visit(i, drawsAsSingletonPictures); |
1507 } | 1509 } |
1508 sk_sp<SkPicture> macroPic(macroRec.finishRecordingAsPicture()); | 1510 sk_sp<SkPicture> macroPic(macroRec.finishRecordingAsPicture()); |
1509 | 1511 |
1510 canvas->drawPicture(macroPic); | 1512 canvas->drawPicture(macroPic); |
1511 return check_against_reference(bitmap, src, fSink); | 1513 return check_against_reference(bitmap, src, fSink); |
1512 }); | 1514 }); |
1513 } | 1515 } |
1514 | 1516 |
1515 } // namespace DM | 1517 } // namespace DM |
OLD | NEW |