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

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

Issue 13468004: Make drawRect preserve vertex attrib state and push/pop the geom sources. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 2010 Google Inc. 3 * Copyright 2010 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 9
10 10
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 info.fIndexCount)) { 604 info.fIndexCount)) {
605 this->onDraw(info); 605 this->onDraw(info);
606 } 606 }
607 info.fStartVertex += info.fVertexCount; 607 info.fStartVertex += info.fVertexCount;
608 instanceCount -= info.fInstanceCount; 608 instanceCount -= info.fInstanceCount;
609 } 609 }
610 } 610 }
611 611
612 //////////////////////////////////////////////////////////////////////////////// 612 ////////////////////////////////////////////////////////////////////////////////
613 613
614 void GrDrawTarget::drawRect(const GrRect& rect, 614 void GrDrawTarget::onDrawRect(const GrRect& rect,
615 const SkMatrix* matrix, 615 const SkMatrix* matrix,
616 const GrRect* localRect, 616 const GrRect* localRect,
617 const SkMatrix* localMatrix) { 617 const SkMatrix* localMatrix) {
618 // position + (optional) texture coord 618 // position + (optional) texture coord
619 static const GrVertexAttrib kAttribs[] = { 619 static const GrVertexAttrib kAttribs[] = {
620 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBin ding}, 620 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBin ding},
621 {kVec2f_GrVertexAttribType, sizeof(GrPoint), kLocalCoord_GrVertexAttribB inding} 621 {kVec2f_GrVertexAttribType, sizeof(GrPoint), kLocalCoord_GrVertexAttribB inding}
622 }; 622 };
623 int attribCount = 1; 623 int attribCount = 1;
624 624
625 if (NULL != localRect) { 625 if (NULL != localRect) {
626 attribCount = 2; 626 attribCount = 2;
627 } 627 }
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 GrPrintf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]); 810 GrPrintf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]);
811 GrPrintf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport] ); 811 GrPrintf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport] );
812 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]); 812 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]);
813 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor t]); 813 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor t]);
814 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); 814 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]);
815 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]); 815 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]);
816 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize); 816 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize);
817 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize); 817 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize);
818 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount); 818 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount);
819 } 819 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698