OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "GrGpu.h" | 10 #include "GrGpu.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 } | 227 } |
228 | 228 |
229 void GrGpu::clearStencilClip(const SkIRect& rect, | 229 void GrGpu::clearStencilClip(const SkIRect& rect, |
230 bool insideClip, | 230 bool insideClip, |
231 GrRenderTarget* renderTarget) { | 231 GrRenderTarget* renderTarget) { |
232 SkASSERT(renderTarget); | 232 SkASSERT(renderTarget); |
233 this->handleDirtyContext(); | 233 this->handleDirtyContext(); |
234 this->onClearStencilClip(renderTarget, rect, insideClip); | 234 this->onClearStencilClip(renderTarget, rect, insideClip); |
235 } | 235 } |
236 | 236 |
| 237 bool GrGpu::copySurface(GrSurface* dst, |
| 238 GrSurface* src, |
| 239 const SkIRect& srcRect, |
| 240 const SkIPoint& dstPoint) { |
| 241 SkASSERT(dst && src); |
| 242 this->handleDirtyContext(); |
| 243 return this->onCopySurface(dst, src, srcRect, dstPoint); |
| 244 } |
| 245 |
237 bool GrGpu::getReadPixelsInfo(GrSurface* srcSurface, int width, int height, size
_t rowBytes, | 246 bool GrGpu::getReadPixelsInfo(GrSurface* srcSurface, int width, int height, size
_t rowBytes, |
238 GrPixelConfig readConfig, DrawPreference* drawPref
erence, | 247 GrPixelConfig readConfig, DrawPreference* drawPref
erence, |
239 ReadPixelTempDrawInfo* tempDrawInfo) { | 248 ReadPixelTempDrawInfo* tempDrawInfo) { |
240 SkASSERT(drawPreference); | 249 SkASSERT(drawPreference); |
241 SkASSERT(tempDrawInfo); | 250 SkASSERT(tempDrawInfo); |
242 SkASSERT(kGpuPrefersDraw_DrawPreference != *drawPreference); | 251 SkASSERT(kGpuPrefersDraw_DrawPreference != *drawPreference); |
243 | 252 |
244 // We currently do not support reading into a compressed buffer | 253 // We currently do not support reading into a compressed buffer |
245 if (GrPixelConfigIsCompressed(readConfig)) { | 254 if (GrPixelConfigIsCompressed(readConfig)) { |
246 return false; | 255 return false; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*this->c
aps())) { | 394 if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*this->c
aps())) { |
386 this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType); | 395 this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType); |
387 } | 396 } |
388 | 397 |
389 GrVertices::Iterator iter; | 398 GrVertices::Iterator iter; |
390 const GrNonInstancedVertices* verts = iter.init(vertices); | 399 const GrNonInstancedVertices* verts = iter.init(vertices); |
391 do { | 400 do { |
392 this->onDraw(args, *verts); | 401 this->onDraw(args, *verts); |
393 } while ((verts = iter.next())); | 402 } while ((verts = iter.next())); |
394 } | 403 } |
OLD | NEW |