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

Side by Side Diff: gm/texdata.cpp

Issue 27023004: Spin off incidental changes from DM CL (22839016). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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
« gm/gm_expectations.h ('K') | « gm/gm_expectations.cpp ('k') | no next file » | 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 /* 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 8
9 // This test only works with the GPU backend. 9 // This test only works with the GPU backend.
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 protected: 29 protected:
30 virtual SkString onShortName() { 30 virtual SkString onShortName() {
31 return SkString("texdata"); 31 return SkString("texdata");
32 } 32 }
33 33
34 virtual SkISize onISize() { 34 virtual SkISize onISize() {
35 return make_isize(2*S, 2*S); 35 return make_isize(2*S, 2*S);
36 } 36 }
37 37
38 virtual uint32_t onGetFlags() const SK_OVERRIDE { return kGPUOnly_Flag; }
39
38 virtual void onDraw(SkCanvas* canvas) { 40 virtual void onDraw(SkCanvas* canvas) {
39 SkBaseDevice* device = canvas->getTopDevice(); 41 SkBaseDevice* device = canvas->getTopDevice();
40 GrRenderTarget* target = device->accessRenderTarget(); 42 GrRenderTarget* target = device->accessRenderTarget();
41 GrContext* ctx = GM::GetGr(canvas); 43 GrContext* ctx = GM::GetGr(canvas);
42 if (ctx && target) { 44 if (ctx && target) {
43 SkPMColor gTextureData[(2 * S) * (2 * S)]; 45 SkPMColor gTextureData[(2 * S) * (2 * S)];
44 static const int stride = 2 * S; 46 static const int stride = 2 * S;
45 static const SkPMColor gray = SkPackARGB32(0x40, 0x40, 0x40, 0x40); 47 static const SkPMColor gray = SkPackARGB32(0x40, 0x40, 0x40, 0x40);
46 static const SkPMColor white = SkPackARGB32(0xff, 0xff, 0xff, 0xff); 48 static const SkPMColor white = SkPackARGB32(0xff, 0xff, 0xff, 0xff);
47 static const SkPMColor red = SkPackARGB32(0x80, 0x80, 0x00, 0x00); 49 static const SkPMColor red = SkPackARGB32(0x80, 0x80, 0x00, 0x00);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 }; 139 };
138 140
139 ////////////////////////////////////////////////////////////////////////////// 141 //////////////////////////////////////////////////////////////////////////////
140 142
141 static GM* MyFactory(void*) { return new TexDataGM; } 143 static GM* MyFactory(void*) { return new TexDataGM; }
142 static GMRegistry reg(MyFactory); 144 static GMRegistry reg(MyFactory);
143 145
144 } 146 }
145 147
146 #endif 148 #endif
OLDNEW
« gm/gm_expectations.h ('K') | « gm/gm_expectations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698