diff options
author | senorblanco <senorblanco@chromium.org> | 2015-01-28 11:01:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-28 11:01:06 -0800 |
commit | 772604c214e8c12ee16d2eb60f4b7acbcdd2129e (patch) | |
tree | 11929f0113e557b4449ad770e4c80d1f8d301469 /src | |
parent | 3dc40ac9f968eee95eef5e8ee811e0640691df0f (diff) |
Add a flag to flush the canvases during SkMultiPictureDraw::draw().
This is necessary for multisampling, so that each multisampled render
target resolves before Chrome's compositor attempts to draw the
texture.
BUG=skia:
Review URL: https://codereview.chromium.org/878653004
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkMultiPictureDraw.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/SkMultiPictureDraw.cpp b/src/core/SkMultiPictureDraw.cpp index c85c56735c..7cdab7300c 100644 --- a/src/core/SkMultiPictureDraw.cpp +++ b/src/core/SkMultiPictureDraw.cpp @@ -86,7 +86,7 @@ public: //#define FORCE_SINGLE_THREAD_DRAWING_FOR_TESTING -void SkMultiPictureDraw::draw() { +void SkMultiPictureDraw::draw(bool flush) { AutoMPDReset mpdreset(this); #ifdef FORCE_SINGLE_THREAD_DRAWING_FOR_TESTING @@ -192,6 +192,9 @@ void SkMultiPictureDraw::draw() { { canvas->drawPicture(picture, &data.fMatrix, data.fPaint); } + if (flush) { + canvas->flush(); + } } #if !defined(SK_IGNORE_GPU_LAYER_HOISTING) && SK_SUPPORT_GPU |