Index: include/gpu/GrContext.h |
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
index 4245b7fa943cc894cb216f609f1e767116264777..00a92836c513d6ef9963cc9d3ca925101a2a489a 100644 |
--- a/include/gpu/GrContext.h |
+++ b/include/gpu/GrContext.h |
@@ -278,17 +278,24 @@ |
* @param src the surface to copy from. |
* @param srcRect the rectangle of the src that should be copied. |
* @param dstPoint the translation applied when writing the srcRect's pixels to the dst. |
- */ |
- bool copySurface(GrSurface* dst, |
+ * @param pixelOpsFlags see PixelOpsFlags enum above. (kUnpremul_PixelOpsFlag is not allowed). |
+ */ |
+ void copySurface(GrSurface* dst, |
GrSurface* src, |
const SkIRect& srcRect, |
- const SkIPoint& dstPoint); |
+ const SkIPoint& dstPoint, |
+ uint32_t pixelOpsFlags = 0); |
/** Helper that copies the whole surface but fails when the two surfaces are not identically |
sized. */ |
bool copySurface(GrSurface* dst, GrSurface* src) { |
- return this->copySurface(dst, src, SkIRect::MakeWH(dst->width(), dst->height()), |
- SkIPoint::Make(0,0)); |
+ if (NULL == dst || NULL == src || dst->width() != src->width() || |
+ dst->height() != src->height()) { |
+ return false; |
+ } |
+ this->copySurface(dst, src, SkIRect::MakeWH(dst->width(), dst->height()), |
+ SkIPoint::Make(0,0)); |
+ return true; |
} |
/** |