| OLD | NEW |
| (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 #ifndef UI_COMPOSITOR_TRANSFORM_RECORDER_H_ |
| 6 #define UI_COMPOSITOR_TRANSFORM_RECORDER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "ui/compositor/compositor_export.h" |
| 10 |
| 11 namespace cc { |
| 12 class DisplayItem; |
| 13 class DisplayItemList; |
| 14 } |
| 15 |
| 16 namespace gfx { |
| 17 class Transform; |
| 18 } |
| 19 |
| 20 namespace ui { |
| 21 class PaintContext; |
| 22 |
| 23 // A class to provide scoped transforms of painting to a DisplayItemList. The |
| 24 // transform provided will be applied to any DisplayItems added to the |
| 25 // DisplayItemList while this object is alive. In other words, any nested |
| 26 // PaintRecorders or other TransformRecorders will be transformed. |
| 27 class COMPOSITOR_EXPORT TransformRecorder { |
| 28 public: |
| 29 explicit TransformRecorder(const PaintContext& context); |
| 30 ~TransformRecorder(); |
| 31 |
| 32 void Transform(const gfx::Transform& transform); |
| 33 |
| 34 private: |
| 35 const PaintContext& context_; |
| 36 bool transformed_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(TransformRecorder); |
| 39 }; |
| 40 |
| 41 } // namespace ui |
| 42 |
| 43 #endif // UI_COMPOSITOR_TRANSFORM_RECORDER_H_ |
| OLD | NEW |