From: bsalomon Date: Tue, 2 Dec 2014 17:40:12 +0000 (-0800) Subject: move some copy surface stuff to GrFlushToGpuDrawTarget X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~4649 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eff2c721b9877e5e9e6c71b21dde0e69eccb2b14;p=platform%2Fupstream%2FlibSkiaSharp.git move some copy surface stuff to GrFlushToGpuDrawTarget Review URL: https://codereview.chromium.org/770813002 --- diff --git a/src/gpu/GrFlushToGpuDrawTarget.cpp b/src/gpu/GrFlushToGpuDrawTarget.cpp index b860468..7007625 100644 --- a/src/gpu/GrFlushToGpuDrawTarget.cpp +++ b/src/gpu/GrFlushToGpuDrawTarget.cpp @@ -249,3 +249,14 @@ void GrFlushToGpuDrawTarget::geometrySourceWillPop(const GeometrySrcState& resto poolState.fUsedPoolIndexBytes = sizeof(uint16_t) * restoredState.fIndexCount; } } + +bool GrFlushToGpuDrawTarget::onCanCopySurface(const GrSurface* dst, + const GrSurface* src, + const SkIRect& srcRect, + const SkIPoint& dstPoint) { + return getGpu()->canCopySurface(dst, src, srcRect, dstPoint); +} + +bool GrFlushToGpuDrawTarget::onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) { + return getGpu()->initCopySurfaceDstDesc(src, desc); +} diff --git a/src/gpu/GrFlushToGpuDrawTarget.h b/src/gpu/GrFlushToGpuDrawTarget.h index f3f34b0..2383c62 100644 --- a/src/gpu/GrFlushToGpuDrawTarget.h +++ b/src/gpu/GrFlushToGpuDrawTarget.h @@ -79,6 +79,11 @@ private: void willReserveVertexAndIndexSpace(int vertexCount, size_t vertexStride, int indexCount) SK_OVERRIDE; + bool onCanCopySurface(const GrSurface* dst, + const GrSurface* src, + const SkIRect& srcRect, + const SkIPoint& dstPoint) SK_OVERRIDE; + bool onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) SK_OVERRIDE; GeoPoolStateStack fGeoPoolStateStack; SkAutoTUnref fGpu; diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp index 8a136cd..6b98e13 100644 --- a/src/gpu/GrInOrderDrawBuffer.cpp +++ b/src/gpu/GrInOrderDrawBuffer.cpp @@ -481,17 +481,6 @@ bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst, return false; } -bool GrInOrderDrawBuffer::onCanCopySurface(const GrSurface* dst, - const GrSurface* src, - const SkIRect& srcRect, - const SkIPoint& dstPoint) { - return getGpu()->canCopySurface(dst, src, srcRect, dstPoint); -} - -bool GrInOrderDrawBuffer::onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) { - return getGpu()->initCopySurfaceDstDesc(src, desc); -} - bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrDrawState& ds, GrGpu::DrawType drawType, const GrClipMaskManager::ScissorState& scissor, diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h index 207f88e..532842a 100644 --- a/src/gpu/GrInOrderDrawBuffer.h +++ b/src/gpu/GrInOrderDrawBuffer.h @@ -225,11 +225,6 @@ private: GrSurface* src, const SkIRect& srcRect, const SkIPoint& dstPoint) SK_OVERRIDE; - bool onCanCopySurface(const GrSurface* dst, - const GrSurface* src, - const SkIRect& srcRect, - const SkIPoint& dstPoint) SK_OVERRIDE; - bool onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) SK_OVERRIDE; // Attempts to concat instances from info onto the previous draw. info must represent an // instanced draw. The caller must have already recorded a new draw state and clip if necessary.