Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(873)

Side by Side Diff: dm/DMSrcSink.cpp

Issue 2031053005: Use SK_TEST_QCMS to mark qcms test code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « dm/DMSrcSink.h ('k') | gyp/common_conditions.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « dm/DMSrcSink.h ('k') | gyp/common_conditions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698