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

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

Issue 19449002: Replace all instances of GrRect with SkRect. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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/GrDrawTarget.h ('k') | src/gpu/GrGpu.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 /* 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 return true; 413 return true;
414 } 414 }
415 415
416 bool GrDrawTarget::setupDstReadIfNecessary(DrawInfo* info) { 416 bool GrDrawTarget::setupDstReadIfNecessary(DrawInfo* info) {
417 if (this->caps()->dstReadInShaderSupport() || !this->getDrawState().willEffe ctReadDstColor()) { 417 if (this->caps()->dstReadInShaderSupport() || !this->getDrawState().willEffe ctReadDstColor()) {
418 return true; 418 return true;
419 } 419 }
420 GrRenderTarget* rt = this->drawState()->getRenderTarget(); 420 GrRenderTarget* rt = this->drawState()->getRenderTarget();
421 421
422 const GrClipData* clip = this->getClip(); 422 const GrClipData* clip = this->getClip();
423 GrIRect copyRect; 423 SkIRect copyRect;
424 clip->getConservativeBounds(this->getDrawState().getRenderTarget(), &copyRec t); 424 clip->getConservativeBounds(this->getDrawState().getRenderTarget(), &copyRec t);
425 SkIRect drawIBounds; 425 SkIRect drawIBounds;
426 if (info->getDevIBounds(&drawIBounds)) { 426 if (info->getDevIBounds(&drawIBounds)) {
427 if (!copyRect.intersect(drawIBounds)) { 427 if (!copyRect.intersect(drawIBounds)) {
428 #if GR_DEBUG 428 #if GR_DEBUG
429 GrPrintf("Missed an early reject. Bailing on draw from setupDstReadI fNecessary.\n"); 429 GrPrintf("Missed an early reject. Bailing on draw from setupDstReadI fNecessary.\n");
430 #endif 430 #endif
431 return false; 431 return false;
432 } 432 }
433 } else { 433 } else {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 void set_vertex_attributes(GrDrawState* drawState, bool hasUVs) { 608 void set_vertex_attributes(GrDrawState* drawState, bool hasUVs) {
609 if (hasUVs) { 609 if (hasUVs) {
610 drawState->setVertexAttribs<gBWRectPosUVAttribs>(2); 610 drawState->setVertexAttribs<gBWRectPosUVAttribs>(2);
611 } else { 611 } else {
612 drawState->setVertexAttribs<gBWRectPosUVAttribs>(1); 612 drawState->setVertexAttribs<gBWRectPosUVAttribs>(1);
613 } 613 }
614 } 614 }
615 615
616 }; 616 };
617 617
618 void GrDrawTarget::onDrawRect(const GrRect& rect, 618 void GrDrawTarget::onDrawRect(const SkRect& rect,
619 const SkMatrix* matrix, 619 const SkMatrix* matrix,
620 const GrRect* localRect, 620 const SkRect* localRect,
621 const SkMatrix* localMatrix) { 621 const SkMatrix* localMatrix) {
622 622
623 GrDrawState::AutoViewMatrixRestore avmr; 623 GrDrawState::AutoViewMatrixRestore avmr;
624 if (NULL != matrix) { 624 if (NULL != matrix) {
625 avmr.set(this->drawState(), *matrix); 625 avmr.set(this->drawState(), *matrix);
626 } 626 }
627 627
628 set_vertex_attributes(this->drawState(), NULL != localRect); 628 set_vertex_attributes(this->drawState(), NULL != localRect);
629 629
630 AutoReleaseGeometry geo(this, 4, 0); 630 AutoReleaseGeometry geo(this, 4, 0);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 GrPrintf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport] ); 985 GrPrintf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport] );
986 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]); 986 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]);
987 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor t]); 987 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor t]);
988 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); 988 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]);
989 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]); 989 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]);
990 GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport]) ; 990 GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport]) ;
991 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize); 991 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize);
992 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize); 992 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize);
993 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount); 993 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount);
994 } 994 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698