diff options
author | Eric Karl <ericrk@chromium.org> | 2017-04-03 14:49:05 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-04 17:26:38 +0000 |
commit | 744808823f635c863d7ca6b4eba652115c92ff85 (patch) | |
tree | 050a0e591c7dd355071a78daa6393d2f5f2f054f /include | |
parent | 8b3f9e64ff6d505036f79aeffd98dea4b648cb46 (diff) |
Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
Crurently, when preparing a texture for blitFramebuffer, we ignore the
kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
copy from one src rect to a different dst rect.
This change updates initDescForDstCopy and setupDstTexture to allocate
larger textures if necessary and accomodate this flags requirements.
Bug: 658277
Change-Id: If4489ac3192dcf6f9996494c63821279721d0a12
Reviewed-on: https://skia-review.googlesource.com/11141
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrCaps.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index 239d4a4ea9..a7096e3fd9 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -189,9 +189,12 @@ public: * This is can be called before allocating a texture to be a dst for copySurface. This is only * used for doing dst copies needed in blends, thus the src is always a GrRenderTarget. It will * populate the origin, config, and flags fields of the desc such that copySurface can - * efficiently succeed. + * efficiently succeed. rectsMustMatch will be set to true if the copy operation must ensure + * that the src and dest rects are identical. disallowSubrect will be set to true if copy rect + * must equal src's bounds. */ - virtual bool initDescForDstCopy(const GrRenderTarget* src, GrSurfaceDesc* desc) const = 0; + virtual bool initDescForDstCopy(const GrRenderTarget* src, GrSurfaceDesc* desc, + bool* rectsMustMatch, bool* disallowSubrect) const = 0; protected: /** Subclasses must call this at the end of their constructors in order to apply caps |