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

Side by Side Diff: src/gpu/GrAARectRenderer.cpp

Issue 14998007: Make GrGLShaderBuilder check whether GrEffect advertised that it would require the dst color or frag (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Address comments Created 7 years, 7 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
« no previous file with comments | « src/gpu/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/GrDrawState.h » ('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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrAARectRenderer.h" 8 #include "GrAARectRenderer.h"
9 #include "GrRefCnt.h" 9 #include "GrRefCnt.h"
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 private: 214 private:
215 typedef GrGLEffect INHERITED; 215 typedef GrGLEffect INHERITED;
216 }; 216 };
217 217
218 218
219 private: 219 private:
220 GrRectEffect() : GrEffect() { 220 GrRectEffect() : GrEffect() {
221 this->addVertexAttrib(kVec4f_GrSLType); 221 this->addVertexAttrib(kVec4f_GrSLType);
222 this->addVertexAttrib(kVec2f_GrSLType); 222 this->addVertexAttrib(kVec2f_GrSLType);
223 this->setWillReadFragmentPosition();
223 } 224 }
224 225
225 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE { return true; } 226 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE { return true; }
226 227
227 GR_DECLARE_EFFECT_TEST; 228 GR_DECLARE_EFFECT_TEST;
228 229
229 typedef GrEffect INHERITED; 230 typedef GrEffect INHERITED;
230 }; 231 };
231 232
232 233
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 // The innermost rect has full coverage 695 // The innermost rect has full coverage
695 verts += 8 * vsize; 696 verts += 8 * vsize;
696 for (int i = 0; i < 4; ++i) { 697 for (int i = 0; i < 4; ++i) {
697 *reinterpret_cast<GrColor*>(verts + i * vsize) = 0; 698 *reinterpret_cast<GrColor*>(verts + i * vsize) = 0;
698 } 699 }
699 700
700 target->setIndexSourceToBuffer(indexBuffer); 701 target->setIndexSourceToBuffer(indexBuffer);
701 target->drawIndexed(kTriangles_GrPrimitiveType, 702 target->drawIndexed(kTriangles_GrPrimitiveType,
702 0, 0, 16, aaStrokeRectIndexCount()); 703 0, 0, 16, aaStrokeRectIndexCount());
703 } 704 }
OLDNEW
« no previous file with comments | « src/gpu/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698