aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawTarget.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@google.com>2015-05-18 09:29:10 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-18 09:29:10 -0700
commit404b3b264b833eb7cffdc833c7e2ebbd708e123a (patch)
treef6a2a9229d9db90b4ec97f29a9fb6f5876f99229 /src/gpu/GrDrawTarget.h
parent9b777967b1e531d0ebdb3349c4bd149fdb86589f (diff)
Revert of Move copy-surface-as-draw fallback to GrGLGpu. (patchset #12 id:220001 of https://codereview.chromium.org/1144433002/)
Reason for revert: Many GMs changed, some totally busted. Original issue's description: > Move copy-surface-as-draw fallback to GrGLGpu. > > Committed: https://skia.googlesource.com/skia/+/5df6fee929823f50c55cc50f7c882a309c1b1de9 TBR=joshualitt@google.com,egdaniel@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1142003003
Diffstat (limited to 'src/gpu/GrDrawTarget.h')
-rw-r--r--src/gpu/GrDrawTarget.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 0157354f88..84f7eb2197 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -178,15 +178,25 @@ public:
* 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.
+ * 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.
*/
- void copySurface(GrSurface* dst,
+ 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.
*/