1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
// Copyright 2014 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 WebDisplayItemList_h
#define WebDisplayItemList_h
#include "WebBlendMode.h"
#include "WebFloatPoint.h"
#include "WebFloatRect.h"
#include "WebRect.h"
#include "WebSize.h"
#include "WebVector.h"
#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkRRect.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "third_party/skia/include/core/SkXfermode.h"
#include "third_party/skia/include/utils/SkMatrix44.h"
class SkImageFilter;
class SkMatrix44;
class SkPicture;
namespace cc {
class FilterOperations;
}
namespace blink {
// An ordered list of items representing content to be rendered (stored in
// 'drawing' items) and operations to be performed when rendering this content
// (stored in 'clip', 'transform', 'filter', etc...). For more details see:
// http://dev.chromium.org/blink/slimming-paint.
class WebDisplayItemList {
public:
virtual ~WebDisplayItemList() { }
virtual void appendDrawingItem(const WebRect& visualRect, sk_sp<const SkPicture>) { }
virtual void appendClipItem(const WebRect& visualRect, const WebRect& clipRect, const WebVector<SkRRect>& roundedClipRects) { }
virtual void appendEndClipItem(const WebRect& visualRect) { }
virtual void appendClipPathItem(const WebRect& visualRect, const SkPath&, SkRegion::Op, bool antialias) { }
virtual void appendEndClipPathItem(const WebRect& visualRect) { }
virtual void appendFloatClipItem(const WebRect& visualRect, const WebFloatRect& clipRect) { }
virtual void appendEndFloatClipItem(const WebRect& visualRect) { }
virtual void appendTransformItem(const WebRect& visualRect, const SkMatrix44&) { }
virtual void appendEndTransformItem(const WebRect& visualRect) { }
virtual void appendCompositingItem(const WebRect& visualRect, float opacity,
SkXfermode::Mode, SkRect* bounds, SkColorFilter*) { }
virtual void appendEndCompositingItem(const WebRect& visualRect) { }
// TODO(loyso): This should use CompositorFilterOperation. crbug.com/584551
virtual void appendFilterItem(const WebRect& visualRect, const cc::FilterOperations&, const WebFloatRect& bounds) { }
virtual void appendEndFilterItem(const WebRect& visualRect) { }
// Scroll containers are identified by an opaque pointer.
using ScrollContainerId = const void*;
virtual void appendScrollItem(const WebRect& visualRect, const WebSize& scrollOffset, ScrollContainerId) { }
virtual void appendEndScrollItem(const WebRect& visualRect) { }
};
} // namespace blink
#endif // WebDisplayItemList_h
|