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

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

Issue 914003003: Use dst copies in porter duffer XP to correctly render certain blends. (Closed) Base URL: https://skia.googlesource.com/skia.git@prePDDstCopy
Patch Set: Created 5 years, 10 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
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 "GrInOrderDrawBuffer.h" 8 #include "GrInOrderDrawBuffer.h"
9 9
10 #include "GrBufferAllocPool.h" 10 #include "GrBufferAllocPool.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 569
570 void GrInOrderDrawBuffer::CopySurface::execute(GrInOrderDrawBuffer* buf, const S etState*) { 570 void GrInOrderDrawBuffer::CopySurface::execute(GrInOrderDrawBuffer* buf, const S etState*) {
571 buf->getGpu()->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint); 571 buf->getGpu()->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint);
572 } 572 }
573 573
574 bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst, 574 bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst,
575 GrSurface* src, 575 GrSurface* src,
576 const SkIRect& srcRect, 576 const SkIRect& srcRect,
577 const SkIPoint& dstPoint) { 577 const SkIPoint& dstPoint) {
578 if (getGpu()->canCopySurface(dst, src, srcRect, dstPoint)) { 578 if (getGpu()->canCopySurface(dst, src, srcRect, dstPoint)) {
579 this->closeBatch();
579 CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst , src)); 580 CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst , src));
580 cs->fSrcRect = srcRect; 581 cs->fSrcRect = srcRect;
581 cs->fDstPoint = dstPoint; 582 cs->fDstPoint = dstPoint;
582 this->recordTraceMarkersIfNecessary(); 583 this->recordTraceMarkersIfNecessary();
583 return true; 584 return true;
584 } 585 }
585 return false; 586 return false;
586 } 587 }
587 588
588 bool GrInOrderDrawBuffer::recordStateAndSetupPipeline(const GrPrimitiveProcessor * primProc, 589 bool GrInOrderDrawBuffer::recordStateAndSetupPipeline(const GrPrimitiveProcessor * primProc,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 int vcount = vertexCount; 696 int vcount = vertexCount;
696 int icount = indexCount; 697 int icount = indexCount;
697 698
698 if (!insideGeoPush && 699 if (!insideGeoPush &&
699 !unreleasedVertexSpace && 700 !unreleasedVertexSpace &&
700 !unreleasedIndexSpace && 701 !unreleasedIndexSpace &&
701 this->geometryHints(vertexStride, &vcount, &icount)) { 702 this->geometryHints(vertexStride, &vcount, &icount)) {
702 this->flush(); 703 this->flush();
703 } 704 }
704 } 705 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698