| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef GrCopySurfaceBatch_DEFINED | 8 #ifndef GrCopySurfaceBatch_DEFINED |
| 9 #define GrCopySurfaceBatch_DEFINED | 9 #define GrCopySurfaceBatch_DEFINED |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 static GrBatch* Create(GrSurface* dst, GrSurface* src, const SkIRect& srcRec
t, | 30 static GrBatch* Create(GrSurface* dst, GrSurface* src, const SkIRect& srcRec
t, |
| 31 const SkIPoint& dstPoint); | 31 const SkIPoint& dstPoint); |
| 32 | 32 |
| 33 const char* name() const override { return "CopySurface"; } | 33 const char* name() const override { return "CopySurface"; } |
| 34 | 34 |
| 35 uint32_t renderTargetUniqueID() const override { | 35 uint32_t renderTargetUniqueID() const override { |
| 36 GrRenderTarget* rt = fDst.get()->asRenderTarget(); | 36 GrRenderTarget* rt = fDst.get()->asRenderTarget(); |
| 37 return rt ? rt->uniqueID() : 0; | 37 return rt ? rt->uniqueID() : 0; |
| 38 } | 38 } |
| 39 GrRenderTarget* renderTarget() const override { return nullptr; } | 39 GrRenderTargetProxy* rtp() const override { return nullptr; } |
| 40 | 40 |
| 41 SkString dumpInfo() const override { | 41 SkString dumpInfo() const override { |
| 42 SkString string; | 42 SkString string; |
| 43 string.printf("SRC: 0x%p, DST: 0x%p, SRECT: [L: %d, T: %d, R: %d, B: %d]
, " | 43 string.printf("SRC: 0x%p, DST: 0x%p, SRECT: [L: %d, T: %d, R: %d, B: %d]
, " |
| 44 "DPT:[X: %d, Y: %d]", | 44 "DPT:[X: %d, Y: %d]", |
| 45 fDst.get(), fSrc.get(), fSrcRect.fLeft, fSrcRect.fTop, fSr
cRect.fRight, | 45 fDst.get(), fSrc.get(), fSrcRect.fLeft, fSrcRect.fTop, fSr
cRect.fRight, |
| 46 fSrcRect.fBottom, fDstPoint.fX, fDstPoint.fY); | 46 fSrcRect.fBottom, fDstPoint.fX, fDstPoint.fY); |
| 47 string.append(INHERITED::dumpInfo()); | 47 string.append(INHERITED::dumpInfo()); |
| 48 return string; | 48 return string; |
| 49 } | 49 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 77 | 77 |
| 78 GrPendingIOResource<GrSurface, kWrite_GrIOType> fDst; | 78 GrPendingIOResource<GrSurface, kWrite_GrIOType> fDst; |
| 79 GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc; | 79 GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc; |
| 80 SkIRect fSrcRect; | 80 SkIRect fSrcRect; |
| 81 SkIPoint fDstPoint; | 81 SkIPoint fDstPoint; |
| 82 | 82 |
| 83 typedef GrBatch INHERITED; | 83 typedef GrBatch INHERITED; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 #endif | 86 #endif |
| OLD | NEW |