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

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

Issue 649783003: Force input coverage to be only a byte in gpu shaders. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « include/gpu/GrTypesPriv.h ('k') | src/gpu/GrAARectRenderer.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "GrAAHairLinePathRenderer.h" 8 #include "GrAAHairLinePathRenderer.h"
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 643
644 // position + edge 644 // position + edge
645 extern const GrVertexAttrib gHairlineBezierAttribs[] = { 645 extern const GrVertexAttrib gHairlineBezierAttribs[] = {
646 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBind ing}, 646 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBind ing},
647 {kVec4f_GrVertexAttribType, sizeof(SkPoint), kGeometryProcessor_GrVertexA ttribBinding} 647 {kVec4f_GrVertexAttribType, sizeof(SkPoint), kGeometryProcessor_GrVertexA ttribBinding}
648 }; 648 };
649 649
650 // position + coverage 650 // position + coverage
651 extern const GrVertexAttrib gHairlineLineAttribs[] = { 651 extern const GrVertexAttrib gHairlineLineAttribs[] = {
652 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBindin g}, 652 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBindin g},
653 {kVec4ub_GrVertexAttribType, sizeof(SkPoint), kCoverage_GrVertexAttribBindin g}, 653 {kUByte_GrVertexAttribType, sizeof(SkPoint), kCoverage_GrVertexAttribBinding },
654 }; 654 };
655 655
656 }; 656 };
657 657
658 bool GrAAHairLinePathRenderer::createLineGeom(const SkPath& path, 658 bool GrAAHairLinePathRenderer::createLineGeom(const SkPath& path,
659 GrDrawTarget* target, 659 GrDrawTarget* target,
660 const PtArray& lines, 660 const PtArray& lines,
661 int lineCnt, 661 int lineCnt,
662 GrDrawTarget::AutoReleaseGeometry* arg, 662 GrDrawTarget::AutoReleaseGeometry* arg,
663 SkRect* devBounds) { 663 SkRect* devBounds) {
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 &devBounds); 967 &devBounds);
968 conics += n; 968 conics += n;
969 } 969 }
970 } 970 }
971 } 971 }
972 972
973 target->resetIndexSource(); 973 target->resetIndexSource();
974 974
975 return true; 975 return true;
976 } 976 }
OLDNEW
« no previous file with comments | « include/gpu/GrTypesPriv.h ('k') | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698