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

Unified Diff: ui/compositor/compositing_recorder.h

Issue 1054783003: views: Access the Canvas through recorders not through PaintContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: uiviews-recorder: . Created 5 years, 8 months 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/BUILD.gn ('k') | ui/compositor/compositing_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositing_recorder.h
diff --git a/ui/compositor/compositing_recorder.h b/ui/compositor/compositing_recorder.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd8bcd7a88f39b970e2527410f724890300d584a
--- /dev/null
+++ b/ui/compositor/compositing_recorder.h
@@ -0,0 +1,36 @@
+// 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_COMPOSITING_RECORDER_H_
+#define UI_COMPOSITOR_COMPOSITING_RECORDER_H_
+
+#include "base/macros.h"
+#include "ui/compositor/compositor_export.h"
+
+namespace gfx {
+class Canvas;
+}
+
+namespace ui {
+class PaintContext;
+
+// A class to provide scoped compositing filters (eg opacity) of painting to a
+// DisplayItemList. The filters provided will be applied to any
+// DisplayItems added to the DisplayItemList while this object is alive. In
+// other words, any nested PaintRecorders or other such Recorders will
+// be filtered by the effect.
+class COMPOSITOR_EXPORT CompositingRecorder {
+ public:
+ CompositingRecorder(const PaintContext& context, float opacity);
+ ~CompositingRecorder();
+
+ private:
+ gfx::Canvas* canvas_;
+
+ DISALLOW_COPY_AND_ASSIGN(CompositingRecorder);
+};
+
+} // namespace ui
+
+#endif // UI_COMPOSITOR_CLIP_TRANSFORM_RECORDER_H_
« no previous file with comments | « ui/compositor/BUILD.gn ('k') | ui/compositor/compositing_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698