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

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

Issue 14633007: Key shader on whether frag pos read is relative to top-left or bottom-left (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address comments Created 7 years, 7 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/GrDrawState.h ('k') | src/gpu/gl/GrGLProgramDesc.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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 GrAssert(drawState.validateVertexAttribs()); 401 GrAssert(drawState.validateVertexAttribs());
402 #endif 402 #endif
403 if (NULL == drawState.getRenderTarget()) { 403 if (NULL == drawState.getRenderTarget()) {
404 return false; 404 return false;
405 } 405 }
406 return true; 406 return true;
407 } 407 }
408 408
409 bool GrDrawTarget::setupDstReadIfNecessary(DrawInfo* info) { 409 bool GrDrawTarget::setupDstReadIfNecessary(DrawInfo* info) {
410 if (this->caps()->dstReadInShaderSupport() || !this->getDrawState().willEffe ctReadDst()) { 410 if (this->caps()->dstReadInShaderSupport() || !this->getDrawState().willEffe ctReadDstColor()) {
411 return true; 411 return true;
412 } 412 }
413 GrRenderTarget* rt = this->drawState()->getRenderTarget(); 413 GrRenderTarget* rt = this->drawState()->getRenderTarget();
414 414
415 const GrClipData* clip = this->getClip(); 415 const GrClipData* clip = this->getClip();
416 GrIRect copyRect; 416 GrIRect copyRect;
417 clip->getConservativeBounds(this->getDrawState().getRenderTarget(), &copyRec t); 417 clip->getConservativeBounds(this->getDrawState().getRenderTarget(), &copyRec t);
418 SkIRect drawIBounds; 418 SkIRect drawIBounds;
419 if (info->getDevIBounds(&drawIBounds)) { 419 if (info->getDevIBounds(&drawIBounds)) {
420 if (!copyRect.intersect(drawIBounds)) { 420 if (!copyRect.intersect(drawIBounds)) {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 GrPoint* coords = GrTCast<GrPoint*>(GrTCast<intptr_t>(geo.vertices()) + 632 GrPoint* coords = GrTCast<GrPoint*>(GrTCast<intptr_t>(geo.vertices()) +
633 sizeof(GrPoint)); 633 sizeof(GrPoint));
634 coords->setRectFan(localRect->fLeft, localRect->fTop, 634 coords->setRectFan(localRect->fLeft, localRect->fTop,
635 localRect->fRight, localRect->fBottom, 635 localRect->fRight, localRect->fBottom,
636 vsize); 636 vsize);
637 if (NULL != localMatrix) { 637 if (NULL != localMatrix) {
638 localMatrix->mapPointsWithStride(coords, vsize, 4); 638 localMatrix->mapPointsWithStride(coords, vsize, 4);
639 } 639 }
640 } 640 }
641 SkTLazy<SkRect> bounds; 641 SkTLazy<SkRect> bounds;
642 if (this->getDrawState().willEffectReadDst()) { 642 if (this->getDrawState().willEffectReadDstColor()) {
643 bounds.init(); 643 bounds.init();
644 this->getDrawState().getViewMatrix().mapRect(bounds.get(), rect); 644 this->getDrawState().getViewMatrix().mapRect(bounds.get(), rect);
645 } 645 }
646 646
647 this->drawNonIndexed(kTriangleFan_GrPrimitiveType, 0, 4, bounds.getMaybeNull ()); 647 this->drawNonIndexed(kTriangleFan_GrPrimitiveType, 0, 4, bounds.getMaybeNull ());
648 } 648 }
649 649
650 void GrDrawTarget::clipWillBeSet(const GrClipData* clipData) { 650 void GrDrawTarget::clipWillBeSet(const GrClipData* clipData) {
651 } 651 }
652 652
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 GrPrintf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport] ); 944 GrPrintf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport] );
945 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]); 945 GrPrintf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]);
946 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor t]); 946 GrPrintf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppor t]);
947 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); 947 GrPrintf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]);
948 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]); 948 GrPrintf("Path Stenciling Support : %s\n", gNY[fPathStencilingSupport]);
949 GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport]) ; 949 GrPrintf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport]) ;
950 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize); 950 GrPrintf("Max Texture Size : %d\n", fMaxTextureSize);
951 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize); 951 GrPrintf("Max Render Target Size : %d\n", fMaxRenderTargetSize);
952 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount); 952 GrPrintf("Max Sample Count : %d\n", fMaxSampleCount);
953 } 953 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698