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

Unified Diff: ui/compositor/clip_recorder.cc

Issue 1494223003: cc: Shrink size of display item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix some compilation issues in ui oops Created 5 years 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 | « cc/trees/layer_tree_host_pixeltest_tiles.cc ('k') | ui/compositor/compositing_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/clip_recorder.cc
diff --git a/ui/compositor/clip_recorder.cc b/ui/compositor/clip_recorder.cc
index cec5c3d9f88140d0c7b970a0d0323161dd2f6cd3..164bd799b234d674506c24303d23af7c27fd46da 100644
--- a/ui/compositor/clip_recorder.cc
+++ b/ui/compositor/clip_recorder.cc
@@ -48,9 +48,8 @@ static gfx::Rect PathToEnclosingRect(const gfx::Path& path) {
void ClipRecorder::ClipRect(const gfx::Rect& clip_rect) {
gfx::Rect clip_in_layer_space = context_.ToLayerSpaceRect(clip_rect);
- auto* item = context_.list_->CreateAndAppendItem<cc::ClipDisplayItem>(
- clip_in_layer_space);
- item->SetNew(clip_rect, std::vector<SkRRect>());
+ context_.list_->CreateAndAppendItem<cc::ClipDisplayItem>(
+ clip_in_layer_space, clip_rect, std::vector<SkRRect>());
RecordCloser(clip_in_layer_space, CLIP_RECT);
}
@@ -58,9 +57,8 @@ void ClipRecorder::ClipPath(const gfx::Path& clip_path) {
bool anti_alias = false;
gfx::Rect clip_in_layer_space =
context_.ToLayerSpaceRect(PathToEnclosingRect(clip_path));
- auto* item = context_.list_->CreateAndAppendItem<cc::ClipPathDisplayItem>(
- clip_in_layer_space);
- item->SetNew(clip_path, SkRegion::kIntersect_Op, anti_alias);
+ context_.list_->CreateAndAppendItem<cc::ClipPathDisplayItem>(
+ clip_in_layer_space, clip_path, SkRegion::kIntersect_Op, anti_alias);
RecordCloser(clip_in_layer_space, CLIP_PATH);
}
@@ -68,9 +66,8 @@ void ClipRecorder::ClipPathWithAntiAliasing(const gfx::Path& clip_path) {
bool anti_alias = true;
gfx::Rect clip_in_layer_space =
context_.ToLayerSpaceRect(PathToEnclosingRect(clip_path));
- auto* item = context_.list_->CreateAndAppendItem<cc::ClipPathDisplayItem>(
- clip_in_layer_space);
- item->SetNew(clip_path, SkRegion::kIntersect_Op, anti_alias);
+ context_.list_->CreateAndAppendItem<cc::ClipPathDisplayItem>(
+ clip_in_layer_space, clip_path, SkRegion::kIntersect_Op, anti_alias);
RecordCloser(clip_in_layer_space, CLIP_PATH);
}
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_tiles.cc ('k') | ui/compositor/compositing_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698