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

Side by Side Diff: gm/texdata.cpp

Issue 582963002: Solo gp (Closed) Base URL: https://skia.googlesource.com/skia.git@no_peb
Patch Set: fix Created 6 years, 3 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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 vm.setRotate(90 * SK_Scalar1, 104 vm.setRotate(90 * SK_Scalar1,
105 S * SK_Scalar1, 105 S * SK_Scalar1,
106 S * SK_Scalar1); 106 S * SK_Scalar1);
107 } else { 107 } else {
108 vm.reset(); 108 vm.reset();
109 } 109 }
110 ctx->setMatrix(vm); 110 ctx->setMatrix(vm);
111 SkMatrix tm; 111 SkMatrix tm;
112 tm = vm; 112 tm = vm;
113 tm.postIDiv(2*S, 2*S); 113 tm.postIDiv(2*S, 2*S);
114 paint.addColorTextureEffect(texture, tm); 114 paint.addColorTextureProcessor(texture, tm);
115 115
116 ctx->drawRect(paint, SkRect::MakeWH(2*S, 2*S)); 116 ctx->drawRect(paint, SkRect::MakeWH(2*S, 2*S));
117 117
118 // now update the lower right of the texture in first pass 118 // now update the lower right of the texture in first pass
119 // or upper right in second pass 119 // or upper right in second pass
120 offset = 0; 120 offset = 0;
121 for (int y = 0; y < S; ++y) { 121 for (int y = 0; y < S; ++y) {
122 for (int x = 0; x < S; ++x) { 122 for (int x = 0; x < S; ++x) {
123 gTextureData[offset + y * stride + x] = 123 gTextureData[offset + y * stride + x] =
124 ((x + y) % 2) ? (i ? green : red) : blue; 124 ((x + y) % 2) ? (i ? green : red) : blue;
(...skipping 12 matching lines...) Expand all
137 }; 137 };
138 138
139 ////////////////////////////////////////////////////////////////////////////// 139 //////////////////////////////////////////////////////////////////////////////
140 140
141 static GM* MyFactory(void*) { return new TexDataGM; } 141 static GM* MyFactory(void*) { return new TexDataGM; }
142 static GMRegistry reg(MyFactory); 142 static GMRegistry reg(MyFactory);
143 143
144 } 144 }
145 145
146 #endif 146 #endif
OLDNEW
« no previous file with comments | « gm/rrects.cpp ('k') | gm/texturedomaineffect.cpp » ('j') | include/gpu/GrGeometryProcessor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698