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

Side by Side Diff: ui/compositor/transform_recorder.cc

Issue 1470123002: Split ClipTransformRecorder into {Clip,Transform}Recorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize transformed to false. 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 unified diff | Download patch
« no previous file with comments | « ui/compositor/transform_recorder.h ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/compositor/transform_recorder.h"
6
7 #include "cc/playback/display_item_list.h"
8 #include "cc/playback/transform_display_item.h"
9 #include "ui/compositor/paint_context.h"
10
11 namespace ui {
12
13 TransformRecorder::TransformRecorder(const PaintContext& context)
14 : context_(context), transformed_(false) {
15 }
16
17 TransformRecorder::~TransformRecorder() {
18 if (transformed_)
19 context_.list_->CreateAndAppendItem<cc::EndTransformDisplayItem>();
20 }
21
22 void TransformRecorder::Transform(const gfx::Transform& transform) {
23 DCHECK(!transformed_);
24 auto* item = context_.list_->CreateAndAppendItem<cc::TransformDisplayItem>();
25 item->SetNew(transform);
26 transformed_ = true;
27 }
28
29 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/transform_recorder.h ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698