Chromium Code Reviews| Index: ui/compositor/transform_recorder.h |
| diff --git a/ui/compositor/transform_recorder.h b/ui/compositor/transform_recorder.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..01d02f50422c4165f25712548bd65aa099149c27 |
| --- /dev/null |
| +++ b/ui/compositor/transform_recorder.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_COMPOSITOR_TRANSFORM_RECORDER_H_ |
| +#define UI_COMPOSITOR_TRANSFORM_RECORDER_H_ |
| + |
| +#include "base/macros.h" |
| +#include "ui/compositor/compositor_export.h" |
| + |
| +namespace cc { |
| +class DisplayItem; |
| +class DisplayItemList; |
| +} |
| + |
| +namespace gfx { |
| +class Transform; |
| +} |
| + |
| +namespace ui { |
| +class PaintContext; |
| + |
| +// A class to provide scoped transforms of painting to a |
| +// DisplayItemList. The transform provided will be applied to any |
| +// DisplayItems added to the DisplayItemList while this object is |
|
danakj
2015/11/23 23:20:30
is this wrapped at 80 or 72?
wkorman
2015/11/23 23:38:08
Done. I fixed my emacs config to address hencefort
|
| +// alive. In other words, any nested PaintRecorders or other |
| +// TransformRecorders will be transformed. |
| +class COMPOSITOR_EXPORT TransformRecorder { |
| + public: |
| + explicit TransformRecorder(const PaintContext& context); |
| + ~TransformRecorder(); |
| + |
| + void Transform(const gfx::Transform& transform); |
| + |
| + private: |
| + const PaintContext& context_; |
| + bool transformed_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TransformRecorder); |
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_COMPOSITOR_TRANSFORM_RECORDER_H_ |