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

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

Issue 12379052: Remove constructors from GrVertexAttrib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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
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 #include "GrAAHairLinePathRenderer.h" 9 #include "GrAAHairLinePathRenderer.h"
10 10
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 GrDrawTarget::AutoReleaseGeometry* arg) { 497 GrDrawTarget::AutoReleaseGeometry* arg) {
498 GrDrawState* drawState = target->drawState(); 498 GrDrawState* drawState = target->drawState();
499 int rtHeight = drawState->getRenderTarget()->height(); 499 int rtHeight = drawState->getRenderTarget()->height();
500 500
501 GrIRect devClipBounds; 501 GrIRect devClipBounds;
502 target->getClip()->getConservativeBounds(drawState->getRenderTarget(), 502 target->getClip()->getConservativeBounds(drawState->getRenderTarget(),
503 &devClipBounds); 503 &devClipBounds);
504 504
505 // position + edge 505 // position + edge
506 static const GrVertexAttrib kAttribs[] = { 506 static const GrVertexAttrib kAttribs[] = {
507 GrVertexAttrib(kVec2f_GrVertexAttribType, 0), 507 {kVec2f_GrVertexAttribType, 0},
508 GrVertexAttrib(kVec4f_GrVertexAttribType, sizeof(GrPoint)) 508 {kVec4f_GrVertexAttribType, sizeof(GrPoint)}
509 }; 509 };
510 static const GrAttribBindings kBindings = GrDrawState::kEdge_AttribBindingsB it; 510 static const GrAttribBindings kBindings = GrDrawState::kEdge_AttribBindingsB it;
511 SkMatrix viewM = drawState->getViewMatrix(); 511 SkMatrix viewM = drawState->getViewMatrix();
512 512
513 PREALLOC_PTARRAY(128) lines; 513 PREALLOC_PTARRAY(128) lines;
514 PREALLOC_PTARRAY(128) quads; 514 PREALLOC_PTARRAY(128) quads;
515 IntArray qSubdivs; 515 IntArray qSubdivs;
516 *quadCnt = generate_lines_and_quads(path, viewM, devClipBounds, 516 *quadCnt = generate_lines_and_quads(path, viewM, devClipBounds,
517 &lines, &quads, &qSubdivs); 517 &lines, &quads, &qSubdivs);
518 518
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 target->drawIndexed(kTriangles_GrPrimitiveType, 626 target->drawIndexed(kTriangles_GrPrimitiveType,
627 4 * lineCnt + kVertsPerQuad*quads, // startV 627 4 * lineCnt + kVertsPerQuad*quads, // startV
628 0, // startI 628 0, // startI
629 kVertsPerQuad*n, // vCount 629 kVertsPerQuad*n, // vCount
630 kIdxsPerQuad*n); // iCount 630 kIdxsPerQuad*n); // iCount
631 quads += n; 631 quads += n;
632 } 632 }
633 drawState->setVertexEdgeType(oldEdgeType); 633 drawState->setVertexEdgeType(oldEdgeType);
634 return true; 634 return true;
635 } 635 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698