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

Side by Side Diff: gm/tablecolorfilter.cpp

Issue 1019493002: Remove uniqueID from all filter serialization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Null out fUniqueID deserialization Created 5 years, 9 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 | « gm/imagefilterscropexpand.cpp ('k') | include/core/SkImageFilter.h » ('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 2011 Google Inc. 2 * Copyright 2011 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 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorFilterImageFilter.h" 10 #include "SkColorFilterImageFilter.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 x += xOffset; 157 x += xOffset;
158 paint.setColorFilter(gColorFilterMakers[i]())->unref(); 158 paint.setColorFilter(gColorFilterMakers[i]())->unref();
159 canvas->drawBitmap(bm, x, y, &paint); 159 canvas->drawBitmap(bm, x, y, &paint);
160 } 160 }
161 161
162 paint.setColorFilter(NULL); 162 paint.setColorFilter(NULL);
163 163
164 for (unsigned i = 0; i < SK_ARRAY_COUNT(gColorFilterMakers); ++i) { 164 for (unsigned i = 0; i < SK_ARRAY_COUNT(gColorFilterMakers); ++i) {
165 SkAutoTUnref<SkColorFilter> colorFilter1(gColorFilterMakers[i]() ); 165 SkAutoTUnref<SkColorFilter> colorFilter1(gColorFilterMakers[i]() );
166 SkAutoTUnref<SkImageFilter> imageFilter1(SkColorFilterImageFilte r::Create( 166 SkAutoTUnref<SkImageFilter> imageFilter1(SkColorFilterImageFilte r::Create(
167 colorFilter1, NULL, NULL, 0)); 167 colorFilter1, NULL, NULL));
168 168
169 // Move down to the next line and draw it 169 // Move down to the next line and draw it
170 // each draw being at xOffset of the previous one 170 // each draw being at xOffset of the previous one
171 y += yOffset; 171 y += yOffset;
172 x = 0; 172 x = 0;
173 for (unsigned j = 1; j < SK_ARRAY_COUNT(gColorFilterMakers); ++j ) { 173 for (unsigned j = 1; j < SK_ARRAY_COUNT(gColorFilterMakers); ++j ) {
174 SkAutoTUnref<SkColorFilter> colorFilter2(gColorFilterMakers[ j]()); 174 SkAutoTUnref<SkColorFilter> colorFilter2(gColorFilterMakers[ j]());
175 SkAutoTUnref<SkImageFilter> imageFilter2(SkColorFilterImageF ilter::Create( 175 SkAutoTUnref<SkImageFilter> imageFilter2(SkColorFilterImageF ilter::Create(
176 colorFilter2, imageFilter1, NULL, 0)); 176 colorFilter2, imageFilter1, NULL));
177 paint.setImageFilter(imageFilter2); 177 paint.setImageFilter(imageFilter2);
178 canvas->drawBitmap(bm, x, y, &paint); 178 canvas->drawBitmap(bm, x, y, &paint);
179 x += xOffset; 179 x += xOffset;
180 } 180 }
181 } 181 }
182 182
183 // Move down one line to the beginning of the block for next bitmap 183 // Move down one line to the beginning of the block for next bitmap
184 y += yOffset; 184 y += yOffset;
185 } 185 }
186 } 186 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 DEF_GM( return new ComposeColorFilterGM(gColors0, gModes0, "wacky"); ) 286 DEF_GM( return new ComposeColorFilterGM(gColors0, gModes0, "wacky"); )
287 287
288 const SkColor gColors1[] = { 0x80FF0000, 0x8000FF00, 0x800000FF }; 288 const SkColor gColors1[] = { 0x80FF0000, 0x8000FF00, 0x800000FF };
289 const SkXfermode::Mode gModes1[] = { 289 const SkXfermode::Mode gModes1[] = {
290 SkXfermode::kSrcOver_Mode, 290 SkXfermode::kSrcOver_Mode,
291 SkXfermode::kXor_Mode, 291 SkXfermode::kXor_Mode,
292 SkXfermode::kDstOut_Mode, 292 SkXfermode::kDstOut_Mode,
293 SkXfermode::kSrcATop_Mode, 293 SkXfermode::kSrcATop_Mode,
294 }; 294 };
295 DEF_GM( return new ComposeColorFilterGM(gColors1, gModes1, "alpha"); ) 295 DEF_GM( return new ComposeColorFilterGM(gColors1, gModes1, "alpha"); )
OLDNEW
« no previous file with comments | « gm/imagefilterscropexpand.cpp ('k') | include/core/SkImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698