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

Side by Side Diff: samplecode/SampleTiling.cpp

Issue 17335008: remove dst/rendertarget support for kARGB_4444_Config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | 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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 static void setup(SkPaint* paint, const SkBitmap& bm, bool filter, 50 static void setup(SkPaint* paint, const SkBitmap& bm, bool filter,
51 SkShader::TileMode tmx, SkShader::TileMode tmy) { 51 SkShader::TileMode tmx, SkShader::TileMode tmy) {
52 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy); 52 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy);
53 paint->setShader(shader)->unref(); 53 paint->setShader(shader)->unref();
54 paint->setFilterBitmap(filter); 54 paint->setFilterBitmap(filter);
55 } 55 }
56 56
57 static const SkBitmap::Config gConfigs[] = { 57 static const SkBitmap::Config gConfigs[] = {
58 SkBitmap::kARGB_8888_Config, 58 SkBitmap::kARGB_8888_Config,
59 SkBitmap::kRGB_565_Config, 59 SkBitmap::kRGB_565_Config,
60 SkBitmap::kARGB_4444_Config
61 }; 60 };
62 static const int gWidth = 32; 61 static const int gWidth = 32;
63 static const int gHeight = 32; 62 static const int gHeight = 32;
64 63
65 class TilingView : public SampleView { 64 class TilingView : public SampleView {
66 SkPicture* fTextPicture; 65 SkPicture* fTextPicture;
67 SkBlurDrawLooper fLooper; 66 SkBlurDrawLooper fLooper;
68 public: 67 public:
69 TilingView() 68 TilingView()
70 : fLooper(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2), 69 : fLooper(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2),
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 163 }
165 164
166 private: 165 private:
167 typedef SampleView INHERITED; 166 typedef SampleView INHERITED;
168 }; 167 };
169 168
170 ////////////////////////////////////////////////////////////////////////////// 169 //////////////////////////////////////////////////////////////////////////////
171 170
172 static SkView* MyFactory() { return new TilingView; } 171 static SkView* MyFactory() { return new TilingView; }
173 static SkViewRegister reg(MyFactory); 172 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleStrokeText.cpp ('k') | src/core/SkBitmap.cpp » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698