| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|