Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4987)

Unified Diff: cc/resources/picture.cc

Issue 1022653002: cc: Use RectToSkRect for less code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 867a86a6a544a926263643ac96ccc3d2faf0d614..e88ff21dc42076570a14aa2b71562182298da2f7 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -213,11 +213,7 @@ void Picture::Record(ContentLayerClient* painter,
canvas->translate(SkFloatToScalar(-layer_rect_.x()),
SkFloatToScalar(-layer_rect_.y()));
- SkRect layer_skrect = SkRect::MakeXYWH(layer_rect_.x(),
- layer_rect_.y(),
- layer_rect_.width(),
- layer_rect_.height());
- canvas->clipRect(layer_skrect);
+ canvas->clipRect(gfx::RectToSkRect(layer_rect_));
painter->PaintContents(canvas.get(), layer_rect_, painting_control);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698