OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "GrFlushToGpuDrawTarget.h" | 8 #include "GrFlushToGpuDrawTarget.h" |
9 #include "GrContext.h" | 9 #include "GrContext.h" |
10 #include "GrGpu.h" | 10 #include "GrGpu.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // we have to assume that any slack we had in our vertex/index data | 242 // we have to assume that any slack we had in our vertex/index data |
243 // is now unreleasable because data may have been appended later in the | 243 // is now unreleasable because data may have been appended later in the |
244 // pool. | 244 // pool. |
245 if (kReserved_GeometrySrcType == restoredState.fVertexSrc) { | 245 if (kReserved_GeometrySrcType == restoredState.fVertexSrc) { |
246 poolState.fUsedPoolVertexBytes = restoredState.fVertexSize * restoredSta
te.fVertexCount; | 246 poolState.fUsedPoolVertexBytes = restoredState.fVertexSize * restoredSta
te.fVertexCount; |
247 } | 247 } |
248 if (kReserved_GeometrySrcType == restoredState.fIndexSrc) { | 248 if (kReserved_GeometrySrcType == restoredState.fIndexSrc) { |
249 poolState.fUsedPoolIndexBytes = sizeof(uint16_t) * restoredState.fIndexC
ount; | 249 poolState.fUsedPoolIndexBytes = sizeof(uint16_t) * restoredState.fIndexC
ount; |
250 } | 250 } |
251 } | 251 } |
| 252 |
| 253 bool GrFlushToGpuDrawTarget::onCanCopySurface(const GrSurface* dst, |
| 254 const GrSurface* src, |
| 255 const SkIRect& srcRect, |
| 256 const SkIPoint& dstPoint) { |
| 257 return getGpu()->canCopySurface(dst, src, srcRect, dstPoint); |
| 258 } |
| 259 |
| 260 bool GrFlushToGpuDrawTarget::onInitCopySurfaceDstDesc(const GrSurface* src, GrSu
rfaceDesc* desc) { |
| 261 return getGpu()->initCopySurfaceDstDesc(src, desc); |
| 262 } |
OLD | NEW |