Chromium Code Reviews| Index: ui/compositor/clip_recorder.h |
| diff --git a/ui/compositor/clip_transform_recorder.h b/ui/compositor/clip_recorder.h |
| similarity index 51% |
| rename from ui/compositor/clip_transform_recorder.h |
| rename to ui/compositor/clip_recorder.h |
| index 276b845cf5b3351dd8036b7e0085b848a624fa5e..9a0173cf828d7046b433f7baee3ec4a2e8dd1b78 100644 |
| --- a/ui/compositor/clip_transform_recorder.h |
| +++ b/ui/compositor/clip_recorder.h |
| @@ -2,10 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef UI_COMPOSITOR_CLIP_TRANSFORM_RECORDER_H_ |
| -#define UI_COMPOSITOR_CLIP_TRANSFORM_RECORDER_H_ |
| - |
| -#include <vector> |
| +#ifndef UI_COMPOSITOR_CLIP_RECORDER_H_ |
| +#define UI_COMPOSITOR_CLIP_RECORDER_H_ |
| #include "base/macros.h" |
| #include "ui/compositor/compositor_export.h" |
| @@ -18,42 +16,39 @@ class DisplayItemList; |
| namespace gfx { |
| class Path; |
| class Rect; |
| -class Transform; |
| } |
| namespace ui { |
| class PaintContext; |
| -// A class to provide scoped clips and transforms of painting to a |
| -// DisplayItemList. The the clip/transform provided will be applied to any |
| -// DisplayItems added to the DisplayItemList while this object is alive. In |
| -// other words, any nested PaintRecorders or other ClipTransformRecorders will |
| -// be clipped/transformed. |
| -class COMPOSITOR_EXPORT ClipTransformRecorder { |
| +// A class to provide scoped clips of painting to a |
|
danakj
2015/11/23 23:20:30
use the full 80 cols
wkorman
2015/11/23 23:38:08
Done.
|
| +// DisplayItemList. The clip provided will be applied to any |
| +// DisplayItems added to the DisplayItemList while this object is |
| +// alive. In other words, any nested PaintRecorders or other |
| +// ClipRecorders will be clipped. |
| +class COMPOSITOR_EXPORT ClipRecorder { |
| public: |
| - explicit ClipTransformRecorder(const PaintContext& context); |
| - ~ClipTransformRecorder(); |
| + explicit ClipRecorder(const PaintContext& context); |
| + ~ClipRecorder(); |
| void ClipRect(const gfx::Rect& clip_rect); |
| void ClipPath(const gfx::Path& clip_path); |
| void ClipPathWithAntiAliasing(const gfx::Path& clip_path); |
| - void Transform(const gfx::Transform& transform); |
| private: |
| enum Closer { |
| CLIP_RECT, |
| CLIP_PATH, |
| - TRANSFORM, |
| }; |
| const PaintContext& context_; |
| // If someone needs to do more than this many operations with a single |
| - // ClipTransformRecorder then increase the size of the closers_ array. |
| + // ClipRecorder then increase the size of the closers_ array. |
| Closer closers_[4]; |
| size_t num_closers_; |
| - DISALLOW_COPY_AND_ASSIGN(ClipTransformRecorder); |
| + DISALLOW_COPY_AND_ASSIGN(ClipRecorder); |
| }; |
| } // namespace ui |
| -#endif // UI_COMPOSITOR_CLIP_TRANSFORM_RECORDER_H_ |
| +#endif // UI_COMPOSITOR_CLIP_RECORDER_H_ |