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

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

Issue 865313004: GMs now use batch (Closed) Base URL: https://skia.googlesource.com/skia.git@oval
Patch Set: fix 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
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/gpu/GrTestBatch.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 * 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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 568
569 void GrInOrderDrawBuffer::CopySurface::execute(GrInOrderDrawBuffer* buf, const S etState*) { 569 void GrInOrderDrawBuffer::CopySurface::execute(GrInOrderDrawBuffer* buf, const S etState*) {
570 buf->getGpu()->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint); 570 buf->getGpu()->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint);
571 } 571 }
572 572
573 bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst, 573 bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst,
574 GrSurface* src, 574 GrSurface* src,
575 const SkIRect& srcRect, 575 const SkIRect& srcRect,
576 const SkIPoint& dstPoint) { 576 const SkIPoint& dstPoint) {
577 if (getGpu()->canCopySurface(dst, src, srcRect, dstPoint)) { 577 if (getGpu()->canCopySurface(dst, src, srcRect, dstPoint)) {
578 this->closeBatch();
578 CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst , src)); 579 CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst , src));
579 cs->fSrcRect = srcRect; 580 cs->fSrcRect = srcRect;
580 cs->fDstPoint = dstPoint; 581 cs->fDstPoint = dstPoint;
581 this->recordTraceMarkersIfNecessary(); 582 this->recordTraceMarkersIfNecessary();
582 return true; 583 return true;
583 } 584 }
584 return false; 585 return false;
585 } 586 }
586 587
587 bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrPipelineBuilder& pipe lineBuilder, 588 bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrPipelineBuilder& pipe lineBuilder,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 int vcount = vertexCount; 683 int vcount = vertexCount;
683 int icount = indexCount; 684 int icount = indexCount;
684 685
685 if (!insideGeoPush && 686 if (!insideGeoPush &&
686 !unreleasedVertexSpace && 687 !unreleasedVertexSpace &&
687 !unreleasedIndexSpace && 688 !unreleasedIndexSpace &&
688 this->geometryHints(vertexStride, &vcount, &icount)) { 689 this->geometryHints(vertexStride, &vcount, &icount)) {
689 this->flush(); 690 this->flush();
690 } 691 }
691 } 692 }
OLDNEW
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/gpu/GrTestBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698