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

Side by Side Diff: gm/texdata.cpp

Issue 869393007: Add standard way to indicate GM is GPU-only. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add include Created 5 years, 10 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/rrects.cpp ('k') | gm/texturedomaineffect.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 /* 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 for (int x = 0; x < S; ++x) { 121 for (int x = 0; x < S; ++x) {
122 gTextureData[offset + y * stride + x] = 122 gTextureData[offset + y * stride + x] =
123 ((x + y) % 2) ? (i ? green : red) : blue; 123 ((x + y) % 2) ? (i ? green : red) : blue;
124 } 124 }
125 } 125 }
126 texture->writePixels(S, (i ? 0 : S), S, S, 126 texture->writePixels(S, (i ? 0 : S), S, S,
127 texture->config(), gTextureData.get(), 127 texture->config(), gTextureData.get(),
128 4 * stride); 128 4 * stride);
129 ctx->drawRect(paint, vm, SkRect::MakeWH(2*S, 2*S)); 129 ctx->drawRect(paint, vm, SkRect::MakeWH(2*S, 2*S));
130 } 130 }
131 } else {
132 this->drawGpuOnlyMessage(canvas);
131 } 133 }
132 } 134 }
133 135
134 private: 136 private:
135 typedef GM INHERITED; 137 typedef GM INHERITED;
136 }; 138 };
137 139
138 ////////////////////////////////////////////////////////////////////////////// 140 //////////////////////////////////////////////////////////////////////////////
139 141
140 static GM* MyFactory(void*) { return new TexDataGM; } 142 static GM* MyFactory(void*) { return new TexDataGM; }
141 static GMRegistry reg(MyFactory); 143 static GMRegistry reg(MyFactory);
142 144
143 } 145 }
144 146
145 #endif 147 #endif
OLDNEW
« no previous file with comments | « gm/rrects.cpp ('k') | gm/texturedomaineffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698