1 // Copyright 2014 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_CLIP_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_
10 #include "base/memory/scoped_ptr.h"
11 #include "cc/base/cc_export.h"
12 #include "cc/playback/display_item.h"
13 #include "third_party/skia/include/core/SkRRect.h"
14 #include "ui/gfx/geometry/rect.h"
20 class CC_EXPORT ClipDisplayItem
: public DisplayItem
{
23 ~ClipDisplayItem() override
;
25 void SetNew(gfx::Rect clip_rect
,
26 const std::vector
<SkRRect
>& rounded_clip_rects
);
28 void Raster(SkCanvas
* canvas
,
29 const gfx::Rect
& canvas_target_playback_rect
,
30 SkPicture::AbortCallback
* callback
) const override
;
31 void AsValueInto(base::trace_event::TracedValue
* array
) const override
;
35 std::vector
<SkRRect
> rounded_clip_rects_
;
38 class CC_EXPORT EndClipDisplayItem
: public DisplayItem
{
41 ~EndClipDisplayItem() override
;
43 void Raster(SkCanvas
* canvas
,
44 const gfx::Rect
& canvas_target_playback_rect
,
45 SkPicture::AbortCallback
* callback
) const override
;
46 void AsValueInto(base::trace_event::TracedValue
* array
) const override
;
51 #endif // CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_