Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: include/gpu/GrContext.h

Issue 1684313002: Make copySurface work for texture dsts, return a bool, & add unit test. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try again Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/gpu/GrDrawContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 00a92836c513d6ef9963cc9d3ca925101a2a489a..4245b7fa943cc894cb216f609f1e767116264777 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -278,24 +278,17 @@ public:
* @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.
- * @param pixelOpsFlags see PixelOpsFlags enum above. (kUnpremul_PixelOpsFlag is not allowed).
*/
- void copySurface(GrSurface* dst,
+ bool copySurface(GrSurface* dst,
GrSurface* src,
const SkIRect& srcRect,
- const SkIPoint& dstPoint,
- uint32_t pixelOpsFlags = 0);
+ const SkIPoint& dstPoint);
/** Helper that copies the whole surface but fails when the two surfaces are not identically
sized. */
bool copySurface(GrSurface* dst, GrSurface* src) {
- 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;
+ return this->copySurface(dst, src, SkIRect::MakeWH(dst->width(), dst->height()),
+ SkIPoint::Make(0,0));
}
/**
« no previous file with comments | « no previous file | include/gpu/GrDrawContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698