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

Side by Side Diff: samplecode/SampleUnpremul.cpp

Issue 670453002: Remove image decoder and encoder autoregistration (Closed) Base URL: https://skia.googlesource.com/skia.git@separate-image-decoder-01-skpicture
Patch Set: Created 6 years, 1 month 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 | « include/images/SkForceLinking.h ('k') | src/core/SkBitmapProcState.cpp » ('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 2013 Google Inc. 2 * Copyright 2013 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 "gm.h" 8 #include "gm.h"
9 9
10 #include "Resources.h" 10 #include "Resources.h"
11 #include "SampleCode.h" 11 #include "SampleCode.h"
12 #include "SkBlurMask.h" 12 #include "SkBlurMask.h"
13 #include "SkBlurDrawLooper.h" 13 #include "SkBlurDrawLooper.h"
14 #include "SkCanvas.h" 14 #include "SkCanvas.h"
15 #include "SkColorPriv.h" 15 #include "SkColorPriv.h"
16 #include "SkForceLinking.h"
17 #include "SkImageDecoder.h" 16 #include "SkImageDecoder.h"
18 #include "SkOSFile.h" 17 #include "SkOSFile.h"
19 #include "SkStream.h" 18 #include "SkStream.h"
20 #include "SkString.h" 19 #include "SkString.h"
21 #include "SkSystemEventTypes.h" 20 #include "SkSystemEventTypes.h"
22 #include "SkTypes.h" 21 #include "SkTypes.h"
23 #include "SkUtils.h" 22 #include "SkUtils.h"
24 #include "SkView.h" 23 #include "SkView.h"
25 24
26 __SK_FORCE_IMAGE_DECODER_LINKING;
27
28 // Defined in SampleColorFilter.cpp 25 // Defined in SampleColorFilter.cpp
29 extern SkShader* createChecker(); 26 extern SkShader* createChecker();
30 27
31 /** 28 /**
32 * Interprets c as an unpremultiplied color, and returns the 29 * Interprets c as an unpremultiplied color, and returns the
33 * premultiplied equivalent. 30 * premultiplied equivalent.
34 */ 31 */
35 static SkPMColor premultiply_unpmcolor(SkPMColor c) { 32 static SkPMColor premultiply_unpmcolor(SkPMColor c) {
36 U8CPU a = SkGetPackedA32(c); 33 U8CPU a = SkGetPackedA32(c);
37 U8CPU r = SkGetPackedR32(c); 34 U8CPU r = SkGetPackedR32(c);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 190
194 typedef SampleView INHERITED; 191 typedef SampleView INHERITED;
195 }; 192 };
196 193
197 ////////////////////////////////////////////////////////////////////////////// 194 //////////////////////////////////////////////////////////////////////////////
198 195
199 static SkView* MyFactory() { 196 static SkView* MyFactory() {
200 return new UnpremulView(GetResourcePath()); 197 return new UnpremulView(GetResourcePath());
201 } 198 }
202 static SkViewRegister reg(MyFactory); 199 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/images/SkForceLinking.h ('k') | src/core/SkBitmapProcState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698