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

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

Issue 694933002: Temporary fix to remove drawrect call from GpuGL (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanupcontext
Patch Set: cleanup Created 6 years, 1 month 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 | « src/gpu/GrInOrderDrawBuffer.h ('k') | src/gpu/gl/GrGpuGL.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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 } 578 }
579 579
580 void GrInOrderDrawBuffer::ClearStencilClip::execute(GrClipTarget* gpu) { 580 void GrInOrderDrawBuffer::ClearStencilClip::execute(GrClipTarget* gpu) {
581 gpu->clearStencilClip(fRect, fInsideClip, this->renderTarget()); 581 gpu->clearStencilClip(fRect, fInsideClip, this->renderTarget());
582 } 582 }
583 583
584 void GrInOrderDrawBuffer::CopySurface::execute(GrClipTarget* gpu) { 584 void GrInOrderDrawBuffer::CopySurface::execute(GrClipTarget* gpu) {
585 gpu->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint); 585 gpu->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint);
586 } 586 }
587 587
588 bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst, 588 bool GrInOrderDrawBuffer::copySurface(GrSurface* dst,
589 GrSurface* src, 589 GrSurface* src,
590 const SkIRect& srcRect, 590 const SkIRect& srcRect,
591 const SkIPoint& dstPoint) { 591 const SkIPoint& dstPoint) {
592 if (fDstGpu->canCopySurface(dst, src, srcRect, dstPoint)) { 592 if (fDstGpu->canCopySurface(dst, src, srcRect, dstPoint)) {
593 CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst , src)); 593 CopySurface* cs = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, CopySurface, (dst , src));
594 cs->fSrcRect = srcRect; 594 cs->fSrcRect = srcRect;
595 cs->fDstPoint = dstPoint; 595 cs->fDstPoint = dstPoint;
596 this->recordTraceMarkersIfNecessary(); 596 this->recordTraceMarkersIfNecessary();
597 return true; 597 return true;
598 } else if (GrDrawTarget::canCopySurface(dst, src, srcRect, dstPoint)) {
599 GrDrawTarget::copySurface(dst, src, srcRect, dstPoint);
600 return true;
598 } else { 601 } else {
599 return false; 602 return false;
600 } 603 }
601 } 604 }
602 605
603 bool GrInOrderDrawBuffer::onCanCopySurface(GrSurface* dst, 606 bool GrInOrderDrawBuffer::canCopySurface(GrSurface* dst,
604 GrSurface* src, 607 GrSurface* src,
605 const SkIRect& srcRect, 608 const SkIRect& srcRect,
606 const SkIPoint& dstPoint) { 609 const SkIPoint& dstPoint) {
607 return fDstGpu->canCopySurface(dst, src, srcRect, dstPoint); 610 return fDstGpu->canCopySurface(dst, src, srcRect, dstPoint) ||
611 GrDrawTarget::canCopySurface(dst, src, srcRect, dstPoint);
608 } 612 }
609 613
610 void GrInOrderDrawBuffer::initCopySurfaceDstDesc(const GrSurface* src, GrSurface Desc* desc) { 614 void GrInOrderDrawBuffer::initCopySurfaceDstDesc(const GrSurface* src, GrSurface Desc* desc) {
611 fDstGpu->initCopySurfaceDstDesc(src, desc); 615 fDstGpu->initCopySurfaceDstDesc(src, desc);
612 } 616 }
613 617
614 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount, 618 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount,
615 int indexCount) { 619 int indexCount) {
616 // We use geometryHints() to know whether to flush the draw buffer. We 620 // We use geometryHints() to know whether to flush the draw buffer. We
617 // can't flush if we are inside an unbalanced pushGeometrySource. 621 // can't flush if we are inside an unbalanced pushGeometrySource.
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); 863 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType);
860 fGpuCmdMarkers.push_back(activeTraceMarkers); 864 fGpuCmdMarkers.push_back(activeTraceMarkers);
861 } 865 }
862 } 866 }
863 867
864 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { 868 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) {
865 INHERITED::clipWillBeSet(newClipData); 869 INHERITED::clipWillBeSet(newClipData);
866 fClipSet = true; 870 fClipSet = true;
867 fClipProxyState = kUnknown_ClipProxyState; 871 fClipProxyState = kUnknown_ClipProxyState;
868 } 872 }
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698