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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 1142003003: Revert of Move copy-surface-as-draw fallback to GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@vares
Patch Set: Created 5 years, 7 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 | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 0157354f88ec02891ca476f08f64f2b534d030a0..84f7eb2197a4aa736aabba9847b9ba5b08ab5518 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -178,14 +178,24 @@
* copied are specified by srcRect. They are copied to a rect of the same
* size in dst with top left at dstPoint. If the src rect is clipped by the
* src bounds then pixel values in the dst rect corresponding to area clipped
- * by the src rect are not overwritten. This method is not guaranteed to succeed
+ * by the src rect are not overwritten. This method can fail and return false
* depending on the type of surface, configs, etc, and the backend-specific
- * limitations.
- */
- void copySurface(GrSurface* dst,
+ * limitations. If rect is clipped out entirely by the src or dst bounds then
+ * true is returned since there is no actual copy necessary to succeed.
+ */
+ bool copySurface(GrSurface* dst,
GrSurface* src,
const SkIRect& srcRect,
const SkIPoint& dstPoint);
+ /**
+ * Function that determines whether a copySurface call would succeed without actually
+ * performing the copy.
+ */
+ bool canCopySurface(const GrSurface* dst,
+ const GrSurface* src,
+ const SkIRect& srcRect,
+ const SkIPoint& dstPoint);
+
/**
* Release any resources that are cached but not currently in use. This
* is intended to give an application some recourse when resources are low.
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698