OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_ |
| 6 #define CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/blink/cc_blink_export.h" |
| 10 #include "cc/resources/display_item_list.h" |
| 11 #include "third_party/WebKit/public/platform/WebBlendMode.h" |
| 12 #include "third_party/WebKit/public/platform/WebContentLayerClient.h" |
| 13 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
| 14 #include "third_party/WebKit/public/platform/WebVector.h" |
| 15 |
| 16 #if WEB_DISPLAY_ITEM_LIST_IS_DEFINED |
| 17 #include "third_party/WebKit/public/platform/WebDisplayItemList.h" |
| 18 #endif |
| 19 |
| 20 class SkImageFilter; |
| 21 class SkMatrix44; |
| 22 class SkPicture; |
| 23 class SkRRect; |
| 24 |
| 25 namespace cc_blink { |
| 26 |
| 27 #if WEB_DISPLAY_ITEM_LIST_IS_DEFINED |
| 28 class WebDisplayItemListImpl : public blink::WebDisplayItemList { |
| 29 #else |
| 30 class WebDisplayItemListImpl { |
| 31 #endif |
| 32 |
| 33 public: |
| 34 CC_BLINK_EXPORT WebDisplayItemListImpl(); |
| 35 virtual ~WebDisplayItemListImpl(); |
| 36 |
| 37 scoped_refptr<cc::DisplayItemList> ToDisplayItemList(); |
| 38 |
| 39 // blink::WebDisplayItemList implementation. |
| 40 virtual void appendDrawingItem(SkPicture* picture, |
| 41 const blink::WebFloatPoint& location); |
| 42 virtual void appendClipItem( |
| 43 const blink::WebRect& clip_rect, |
| 44 const blink::WebVector<SkRRect>& rounded_clip_rects); |
| 45 virtual void appendEndClipItem(); |
| 46 virtual void appendTransformItem(const SkMatrix44& matrix); |
| 47 virtual void appendEndTransformItem(); |
| 48 virtual void appendTransparencyItem(float opacity, |
| 49 blink::WebBlendMode blend_mode); |
| 50 virtual void appendEndTransparencyItem(); |
| 51 virtual void appendFilterItem(SkImageFilter* filter, |
| 52 const blink::WebFloatRect& bounds); |
| 53 virtual void appendEndFilterItem(); |
| 54 |
| 55 private: |
| 56 scoped_refptr<cc::DisplayItemList> display_item_list_; |
| 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(WebDisplayItemListImpl); |
| 59 }; |
| 60 |
| 61 } // namespace cc_blink |
| 62 |
| 63 #endif // CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_ |
OLD | NEW |