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

Unified Diff: ui/compositor/clip_transform_recorder.h

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, 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/clip_recorder.cc ('k') | ui/compositor/clip_transform_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/clip_transform_recorder.h
diff --git a/ui/compositor/clip_transform_recorder.h b/ui/compositor/clip_transform_recorder.h
deleted file mode 100644
index 276b845cf5b3351dd8036b7e0085b848a624fa5e..0000000000000000000000000000000000000000
--- a/ui/compositor/clip_transform_recorder.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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_CLIP_TRANSFORM_RECORDER_H_
-#define UI_COMPOSITOR_CLIP_TRANSFORM_RECORDER_H_
-
-#include <vector>
-
-#include "base/macros.h"
-#include "ui/compositor/compositor_export.h"
-
-namespace cc {
-class DisplayItem;
-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 {
- public:
- explicit ClipTransformRecorder(const PaintContext& context);
- ~ClipTransformRecorder();
-
- 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.
- Closer closers_[4];
- size_t num_closers_;
-
- DISALLOW_COPY_AND_ASSIGN(ClipTransformRecorder);
-};
-
-} // namespace ui
-
-#endif // UI_COMPOSITOR_CLIP_TRANSFORM_RECORDER_H_
« no previous file with comments | « ui/compositor/clip_recorder.cc ('k') | ui/compositor/clip_transform_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698