Update V8 to version 4.7.37.
[chromium-blink-merge.git] / cc / playback / compositing_display_item.h
blob91cd3e71f8e8f1dff57a48ce263e6881c00b32ee
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 CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h"
10 #include "cc/playback/display_item.h"
11 #include "skia/ext/refptr.h"
12 #include "third_party/skia/include/core/SkColorFilter.h"
13 #include "third_party/skia/include/core/SkRect.h"
14 #include "third_party/skia/include/core/SkXfermode.h"
15 #include "ui/gfx/geometry/rect_f.h"
17 class SkCanvas;
19 namespace cc {
21 class CC_EXPORT CompositingDisplayItem : public DisplayItem {
22 public:
23 CompositingDisplayItem();
24 ~CompositingDisplayItem() override;
26 void SetNew(uint8_t alpha,
27 SkXfermode::Mode xfermode,
28 SkRect* bounds,
29 skia::RefPtr<SkColorFilter> color_filter);
31 void Raster(SkCanvas* canvas,
32 const gfx::Rect& canvas_target_playback_rect,
33 SkPicture::AbortCallback* callback) const override;
34 void AsValueInto(base::trace_event::TracedValue* array) const override;
36 private:
37 uint8_t alpha_;
38 SkXfermode::Mode xfermode_;
39 bool has_bounds_;
40 SkRect bounds_;
41 skia::RefPtr<SkColorFilter> color_filter_;
44 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem {
45 public:
46 EndCompositingDisplayItem();
47 ~EndCompositingDisplayItem() override;
49 static scoped_ptr<EndCompositingDisplayItem> Create() {
50 return make_scoped_ptr(new EndCompositingDisplayItem());
53 void Raster(SkCanvas* canvas,
54 const gfx::Rect& canvas_target_playback_rect,
55 SkPicture::AbortCallback* callback) const override;
56 void AsValueInto(base::trace_event::TracedValue* array) const override;
59 } // namespace cc
61 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_