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

Side by Side Diff: gm/tilemodes.cpp

Issue 21835004: Blur refactoring (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: hide constant Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkRegion.h" 10 #include "SkRegion.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 static const SkBitmap::Config gConfigs[] = { 53 static const SkBitmap::Config gConfigs[] = {
54 SkBitmap::kARGB_8888_Config, 54 SkBitmap::kARGB_8888_Config,
55 SkBitmap::kRGB_565_Config, 55 SkBitmap::kRGB_565_Config,
56 }; 56 };
57 57
58 class TilingGM : public skiagm::GM { 58 class TilingGM : public skiagm::GM {
59 SkBlurDrawLooper fLooper; 59 SkBlurDrawLooper fLooper;
60 public: 60 public:
61 TilingGM(bool powerOfTwoSize) 61 TilingGM(bool powerOfTwoSize)
62 : fLooper(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2), 0x88 000000) 62 : fLooper(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2), 0x88 000000,
63 SkBlurDrawLooper::kNone_BlurFlag)
63 , fPowerOfTwoSize(powerOfTwoSize) { 64 , fPowerOfTwoSize(powerOfTwoSize) {
64 } 65 }
65 66
66 SkBitmap fTexture[SK_ARRAY_COUNT(gConfigs)]; 67 SkBitmap fTexture[SK_ARRAY_COUNT(gConfigs)];
67 68
68 protected: 69 protected:
69 70
70 enum { 71 enum {
71 kPOTSize = 32, 72 kPOTSize = 32,
72 kNPOTSize = 21, 73 kNPOTSize = 21,
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 private: 261 private:
261 typedef skiagm::GM INHERITED; 262 typedef skiagm::GM INHERITED;
262 }; 263 };
263 264
264 ////////////////////////////////////////////////////////////////////////////// 265 //////////////////////////////////////////////////////////////////////////////
265 266
266 DEF_GM( return new TilingGM(true); ) 267 DEF_GM( return new TilingGM(true); )
267 DEF_GM( return new TilingGM(false); ) 268 DEF_GM( return new TilingGM(false); )
268 DEF_GM( return new Tiling2GM(make_bm, "bitmap"); ) 269 DEF_GM( return new Tiling2GM(make_bm, "bitmap"); )
269 DEF_GM( return new Tiling2GM(make_grad, "gradient"); ) 270 DEF_GM( return new Tiling2GM(make_grad, "gradient"); )
OLDNEW
« no previous file with comments | « gm/texteffects.cpp ('k') | include/core/SkPicture.h » ('j') | include/effects/SkBlurDrawLooper.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698