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 WebDisplayItemList_h
6 #define WebDisplayItemList_h
8 #include "WebBlendMode.h"
9 #include "WebFloatPoint.h"
10 #include "WebFloatRect.h"
13 #include "WebVector.h"
15 #include "third_party/skia/include/core/SkColorFilter.h"
16 #include "third_party/skia/include/core/SkRRect.h"
17 #include "third_party/skia/include/core/SkRegion.h"
18 #include "third_party/skia/include/core/SkXfermode.h"
19 #include "third_party/skia/include/utils/SkMatrix44.h"
26 class WebFilterOperations
;
28 // An ordered list of items representing content to be rendered (stored in
29 // 'drawing' items) and operations to be performed when rendering this content
30 // (stored in 'clip', 'transform', 'filter', etc...). For more details see:
31 // http://dev.chromium.org/blink/slimming-paint.
32 class WebDisplayItemList
{
34 virtual ~WebDisplayItemList() { }
36 // This grabs a ref on the passed-in SkPicture.
37 virtual void appendDrawingItem(const SkPicture
*) { }
39 virtual void appendClipItem(const WebRect
&, const WebVector
<SkRRect
>&) { }
40 virtual void appendEndClipItem() { }
41 virtual void appendClipPathItem(const SkPath
&, SkRegion::Op
, bool antialias
) { }
42 virtual void appendEndClipPathItem() { }
43 virtual void appendFloatClipItem(const WebFloatRect
&) { }
44 virtual void appendEndFloatClipItem() { }
45 virtual void appendTransformItem(const SkMatrix44
&) { }
46 virtual void appendEndTransformItem() { }
47 virtual void appendCompositingItem(float opacity
,
48 SkXfermode::Mode
, SkRect
* bounds
, SkColorFilter
*) { }
49 virtual void appendEndCompositingItem() { }
51 virtual void appendFilterItem(const WebFilterOperations
&, const WebFloatRect
& bounds
) { }
52 virtual void appendEndFilterItem() { }
54 // Scroll containers are identified by an opaque pointer.
55 using ScrollContainerId
= const void*;
56 virtual void appendScrollItem(const WebSize
& scrollOffset
, ScrollContainerId
) { }
57 virtual void appendEndScrollItem() { }
62 #endif // WebDisplayItemList_h