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

Side by Side Diff: gm/texturedomaineffect.cpp

Issue 858343002: Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more nits Created 5 years, 11 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/yuvtorgbeffect.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 2014 Google Inc. 3 * Copyright 2014 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 GrTextureDomainEffect::Create(texture, textureMatrices[t m], 123 GrTextureDomainEffect::Create(texture, textureMatrices[t m],
124 GrTextureDomain::MakeTexelDomain (texture, 124 GrTextureDomain::MakeTexelDomain (texture,
125 texelDomains[d]), 125 texelDomains[d]),
126 mode, GrTextureParams::kNone_Fil terMode)); 126 mode, GrTextureParams::kNone_Fil terMode));
127 127
128 if (!fp) { 128 if (!fp) {
129 continue; 129 continue;
130 } 130 }
131 SkMatrix viewMatrix; 131 SkMatrix viewMatrix;
132 viewMatrix.setTranslate(x, y); 132 viewMatrix.setTranslate(x, y);
133 GrDrawState drawState; 133 GrPipelineBuilder pipelineBuilder;
134 drawState.setRenderTarget(rt); 134 pipelineBuilder.setRenderTarget(rt);
135 drawState.addColorProcessor(fp); 135 pipelineBuilder.addColorProcessor(fp);
136 136
137 tt.target()->drawSimpleRect(&drawState, GrColor_WHITE, viewM atrix, renderRect); 137 tt.target()->drawSimpleRect(&pipelineBuilder, GrColor_WHITE, viewMatrix,
138 renderRect);
138 x += renderRect.width() + kTestPad; 139 x += renderRect.width() + kTestPad;
139 } 140 }
140 y += renderRect.height() + kTestPad; 141 y += renderRect.height() + kTestPad;
141 } 142 }
142 } 143 }
143 } 144 }
144 145
145 private: 146 private:
146 static const SkScalar kDrawPad; 147 static const SkScalar kDrawPad;
147 static const SkScalar kTestPad; 148 static const SkScalar kTestPad;
148 static const int kTargetWidth = 100; 149 static const int kTargetWidth = 100;
149 static const int kTargetHeight = 100; 150 static const int kTargetHeight = 100;
150 SkBitmap fBmp; 151 SkBitmap fBmp;
151 152
152 typedef GM INHERITED; 153 typedef GM INHERITED;
153 }; 154 };
154 155
155 // Windows builds did not like SkScalar initialization in class :( 156 // Windows builds did not like SkScalar initialization in class :(
156 const SkScalar TextureDomainEffect::kDrawPad = 10.f; 157 const SkScalar TextureDomainEffect::kDrawPad = 10.f;
157 const SkScalar TextureDomainEffect::kTestPad = 10.f; 158 const SkScalar TextureDomainEffect::kTestPad = 10.f;
158 159
159 DEF_GM( return SkNEW(TextureDomainEffect); ) 160 DEF_GM( return SkNEW(TextureDomainEffect); )
160 } 161 }
161 162
162 #endif 163 #endif
OLDNEW
« no previous file with comments | « gm/rrects.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698