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

Unified Diff: ui/compositor/transform_recorder.cc

Issue 1423653005: Further plumb visual rect into cc:DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix clip recorder params in omnibox. Created 5 years, 1 month 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 | « ui/compositor/transform_recorder.h ('k') | ui/views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/transform_recorder.cc
diff --git a/ui/compositor/transform_recorder.cc b/ui/compositor/transform_recorder.cc
index 1bb15b047a2cf0b52e3ed6530b9dea1e2a677c6a..5eb4038deedd2f8bcf1fc42f527b0659f5b38ae9 100644
--- a/ui/compositor/transform_recorder.cc
+++ b/ui/compositor/transform_recorder.cc
@@ -10,18 +10,22 @@
namespace ui {
-TransformRecorder::TransformRecorder(const PaintContext& context)
- : context_(context), transformed_(false) {
-}
+TransformRecorder::TransformRecorder(const PaintContext& context,
+ const gfx::Size& size_in_layer)
+ : context_(context),
+ bounds_in_layer_(context.ToLayerSpaceBounds(size_in_layer)),
+ transformed_(false) {}
TransformRecorder::~TransformRecorder() {
if (transformed_)
- context_.list_->CreateAndAppendItem<cc::EndTransformDisplayItem>();
+ context_.list_->CreateAndAppendItem<cc::EndTransformDisplayItem>(
+ bounds_in_layer_);
}
void TransformRecorder::Transform(const gfx::Transform& transform) {
DCHECK(!transformed_);
- auto* item = context_.list_->CreateAndAppendItem<cc::TransformDisplayItem>();
+ auto* item = context_.list_->CreateAndAppendItem<cc::TransformDisplayItem>(
+ bounds_in_layer_);
item->SetNew(transform);
transformed_ = true;
}
« no previous file with comments | « ui/compositor/transform_recorder.h ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698