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 "Resources.h" | 9 #include "Resources.h" |
10 #include "SkAndroidCodec.h" | 10 #include "SkAndroidCodec.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "SkStream.h" | 34 #include "SkStream.h" |
35 #include "SkTLogic.h" | 35 #include "SkTLogic.h" |
36 #include "SkXMLWriter.h" | 36 #include "SkXMLWriter.h" |
37 #include "SkSwizzler.h" | 37 #include "SkSwizzler.h" |
38 #include <functional> | 38 #include <functional> |
39 | 39 |
40 #if defined(SK_BUILD_FOR_WIN) | 40 #if defined(SK_BUILD_FOR_WIN) |
41 #include "SkAutoCoInitialize.h" | 41 #include "SkAutoCoInitialize.h" |
42 #endif | 42 #endif |
43 | 43 |
44 #if !defined(GOOGLE3) | 44 #if defined(SK_TEST_QCMS) |
45 #include "qcms.h" | 45 #include "qcms.h" |
46 #endif | 46 #endif |
47 | 47 |
48 DEFINE_bool(multiPage, false, "For document-type backends, render the source" | 48 DEFINE_bool(multiPage, false, "For document-type backends, render the source" |
49 " into multiple pages"); | 49 " into multiple pages"); |
50 DEFINE_bool(RAW_threading, true, "Allow RAW decodes to run on multiple threads?"
); | 50 DEFINE_bool(RAW_threading, true, "Allow RAW decodes to run on multiple threads?"
); |
51 | 51 |
52 using sk_gpu_test::GrContextFactory; | 52 using sk_gpu_test::GrContextFactory; |
53 | 53 |
54 namespace DM { | 54 namespace DM { |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 | 925 |
926 uint32_t* row = (uint32_t*) bitmap.getPixels(); | 926 uint32_t* row = (uint32_t*) bitmap.getPixels(); |
927 for (int y = 0; y < info.height(); y++) { | 927 for (int y = 0; y < info.height(); y++) { |
928 xform->xform_RGBA_8888(row, row, info.width()); | 928 xform->xform_RGBA_8888(row, row, info.width()); |
929 row = SkTAddOffset<uint32_t>(row, bitmap.rowBytes()); | 929 row = SkTAddOffset<uint32_t>(row, bitmap.rowBytes()); |
930 } | 930 } |
931 | 931 |
932 canvas->drawBitmap(bitmap, 0, 0); | 932 canvas->drawBitmap(bitmap, 0, 0); |
933 break; | 933 break; |
934 } | 934 } |
935 #if !defined(GOOGLE3) | 935 #if defined(SK_TEST_QCMS) |
936 case kQCMS_HPZR30w_Mode: { | 936 case kQCMS_HPZR30w_Mode: { |
937 sk_sp<SkData> srcData = codec->getICCData(); | 937 sk_sp<SkData> srcData = codec->getICCData(); |
938 SkAutoTCallVProc<qcms_profile, qcms_profile_release> | 938 SkAutoTCallVProc<qcms_profile, qcms_profile_release> |
939 srcSpace(qcms_profile_from_memory(srcData->data(), srcData->
size())); | 939 srcSpace(qcms_profile_from_memory(srcData->data(), srcData->
size())); |
940 if (!srcSpace) { | 940 if (!srcSpace) { |
941 return Error::Nonfatal(SkStringPrintf("QCMS cannot create profil
e for %s.\n", | 941 return Error::Nonfatal(SkStringPrintf("QCMS cannot create profil
e for %s.\n", |
942 fPath.c_str())); | 942 fPath.c_str())); |
943 } | 943 } |
944 | 944 |
945 SkAutoTCallVProc<qcms_profile, qcms_profile_release> | 945 SkAutoTCallVProc<qcms_profile, qcms_profile_release> |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1563 skr.visit(i, drawsAsSingletonPictures); | 1563 skr.visit(i, drawsAsSingletonPictures); |
1564 } | 1564 } |
1565 sk_sp<SkPicture> macroPic(macroRec.finishRecordingAsPicture()); | 1565 sk_sp<SkPicture> macroPic(macroRec.finishRecordingAsPicture()); |
1566 | 1566 |
1567 canvas->drawPicture(macroPic); | 1567 canvas->drawPicture(macroPic); |
1568 return check_against_reference(bitmap, src, fSink); | 1568 return check_against_reference(bitmap, src, fSink); |
1569 }); | 1569 }); |
1570 } | 1570 } |
1571 | 1571 |
1572 } // namespace DM | 1572 } // namespace DM |
OLD | NEW |