Disable draw_properties benchmark on Android.
[chromium-blink-merge.git] / ui / compositor / compositing_recorder.h
blob704cde9510b43718a6100dec7d5045d185f429cf
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.
5 #ifndef UI_COMPOSITOR_COMPOSITING_RECORDER_H_
6 #define UI_COMPOSITOR_COMPOSITING_RECORDER_H_
8 #include "base/basictypes.h"
9 #include "base/macros.h"
10 #include "ui/compositor/compositor_export.h"
12 namespace gfx {
13 class Canvas;
16 namespace ui {
17 class PaintContext;
19 // A class to provide scoped compositing filters (eg opacity) of painting to a
20 // DisplayItemList. The filters provided will be applied to any
21 // DisplayItems added to the DisplayItemList while this object is alive. In
22 // other words, any nested PaintRecorders or other such Recorders will
23 // be filtered by the effect.
24 class COMPOSITOR_EXPORT CompositingRecorder {
25 public:
26 // |alpha| is a value between 0 and 255, where 0 is transparent and 255 is
27 // opaque.
28 CompositingRecorder(const PaintContext& context, uint8_t alpha);
29 ~CompositingRecorder();
31 private:
32 gfx::Canvas* canvas_;
33 bool saved_;
35 DISALLOW_COPY_AND_ASSIGN(CompositingRecorder);
38 } // namespace ui
40 #endif // UI_COMPOSITOR_CLIP_TRANSFORM_RECORDER_H_