Commit 3841a6ed authored by Tobias Sargeant's avatar Tobias Sargeant Committed by Commit Bot

[aw] Early out zero-sized AwPicture draws

Bug: 1068864
Change-Id: I8e25de6cfa9cbe99a7aa7326650ecb871a7539a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146550Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarTobias Sargeant <tobiasjs@chromium.org>
Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758889}
parent d22f3f7d
...@@ -34,6 +34,9 @@ void AwPicture::Draw(JNIEnv* env, ...@@ -34,6 +34,9 @@ void AwPicture::Draw(JNIEnv* env,
const JavaParamRef<jobject>& obj, const JavaParamRef<jobject>& obj,
const JavaParamRef<jobject>& canvas) { const JavaParamRef<jobject>& canvas) {
const SkIRect bounds = picture_->cullRect().roundOut(); const SkIRect bounds = picture_->cullRect().roundOut();
if (bounds.isEmpty()) {
return;
}
std::unique_ptr<SoftwareCanvasHolder> canvas_holder = std::unique_ptr<SoftwareCanvasHolder> canvas_holder =
SoftwareCanvasHolder::Create(canvas, gfx::Vector2d(), SoftwareCanvasHolder::Create(canvas, gfx::Vector2d(),
gfx::Size(bounds.width(), bounds.height()), gfx::Size(bounds.width(), bounds.height()),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment