diff options
author | Mike Reed <reed@google.com> | 2017-03-10 13:54:16 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-10 19:58:14 +0000 |
commit | dc9f0dbe4cdcdf6fead5fc28532d58f7d998a447 (patch) | |
tree | 2fd3b0ad0a817c95ea52588e6047a9324e4892c9 /src | |
parent | cccda60aca592d2320d79e2871e057778b2688ab (diff) |
Check for bad bounds in picture cullbounds
BUG=skia:
Change-Id: Icaed150fa005ba7539bcca4646710b42dfcbf94a
Reviewed-on: https://skia-review.googlesource.com/9536
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkPictureRecorder.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp index 0c81632eb8..aaf1d0d0de 100644 --- a/src/core/SkPictureRecorder.cpp +++ b/src/core/SkPictureRecorder.cpp @@ -18,14 +18,16 @@ SkPictureRecorder::SkPictureRecorder() { fActivelyRecording = false; - fRecorder.reset(new SkRecorder(nullptr, SkRect::MakeWH(0, 0), &fMiniRecorder)); + fRecorder.reset(new SkRecorder(nullptr, SkRect::MakeEmpty(), &fMiniRecorder)); } SkPictureRecorder::~SkPictureRecorder() {} -SkCanvas* SkPictureRecorder::beginRecording(const SkRect& cullRect, +SkCanvas* SkPictureRecorder::beginRecording(const SkRect& userCullRect, SkBBHFactory* bbhFactory /* = nullptr */, uint32_t recordFlags /* = 0 */) { + const SkRect cullRect = userCullRect.isEmpty() ? SkRect::MakeEmpty() : userCullRect; + fCullRect = cullRect; fFlags = recordFlags; |