| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_ | 5 #ifndef CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_ |
| 6 #define CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_ | 6 #define CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/blink/cc_blink_export.h" | 9 #include "cc/blink/cc_blink_export.h" |
| 10 #include "cc/resources/display_item_list.h" | 10 #include "cc/resources/display_item_list.h" |
| 11 #include "third_party/WebKit/public/platform/WebBlendMode.h" | 11 #include "third_party/WebKit/public/platform/WebBlendMode.h" |
| 12 #include "third_party/WebKit/public/platform/WebContentLayerClient.h" | 12 #include "third_party/WebKit/public/platform/WebContentLayerClient.h" |
| 13 #include "third_party/WebKit/public/platform/WebDisplayItemList.h" | 13 #include "third_party/WebKit/public/platform/WebDisplayItemList.h" |
| 14 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 14 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
| 15 #include "third_party/WebKit/public/platform/WebVector.h" | 15 #include "third_party/WebKit/public/platform/WebVector.h" |
| 16 #include "third_party/skia/include/core/SkRegion.h" | 16 #include "third_party/skia/include/core/SkRegion.h" |
| 17 #include "ui/gfx/geometry/point_f.h" |
| 17 | 18 |
| 18 class SkImageFilter; | 19 class SkImageFilter; |
| 19 class SkMatrix44; | 20 class SkMatrix44; |
| 20 class SkPath; | 21 class SkPath; |
| 21 class SkPicture; | 22 class SkPicture; |
| 22 class SkRRect; | 23 class SkRRect; |
| 23 | 24 |
| 24 namespace cc_blink { | 25 namespace cc_blink { |
| 25 | 26 |
| 26 class WebDisplayItemListImpl : public blink::WebDisplayItemList { | 27 class WebDisplayItemListImpl : public blink::WebDisplayItemList { |
| 27 public: | 28 public: |
| 28 CC_BLINK_EXPORT WebDisplayItemListImpl(); | 29 CC_BLINK_EXPORT WebDisplayItemListImpl(); |
| 29 virtual ~WebDisplayItemListImpl(); | 30 virtual ~WebDisplayItemListImpl(); |
| 30 | 31 |
| 31 scoped_refptr<cc::DisplayItemList> ToDisplayItemList(); | 32 scoped_refptr<cc::DisplayItemList> ToDisplayItemList(); |
| 32 | 33 |
| 33 // blink::WebDisplayItemList implementation. | 34 // blink::WebDisplayItemList implementation. |
| 34 virtual void appendDrawingItem(SkPicture* picture, | 35 virtual void appendDrawingItem( |
| 35 const blink::WebFloatPoint& location); | 36 const SkPicture*, |
| 37 const blink::WebFloatPoint& location = gfx::PointF()); |
| 36 virtual void appendClipItem( | 38 virtual void appendClipItem( |
| 37 const blink::WebRect& clip_rect, | 39 const blink::WebRect& clip_rect, |
| 38 const blink::WebVector<SkRRect>& rounded_clip_rects); | 40 const blink::WebVector<SkRRect>& rounded_clip_rects); |
| 39 virtual void appendEndClipItem(); | 41 virtual void appendEndClipItem(); |
| 40 virtual void appendClipPathItem(const SkPath& clip_path, | 42 virtual void appendClipPathItem(const SkPath& clip_path, |
| 41 SkRegion::Op clip_op, | 43 SkRegion::Op clip_op, |
| 42 bool antialias); | 44 bool antialias); |
| 43 virtual void appendEndClipPathItem(); | 45 virtual void appendEndClipPathItem(); |
| 44 virtual void appendFloatClipItem(const blink::WebFloatRect& clip_rect); | 46 virtual void appendFloatClipItem(const blink::WebFloatRect& clip_rect); |
| 45 virtual void appendEndFloatClipItem(); | 47 virtual void appendEndFloatClipItem(); |
| 46 virtual void appendTransformItem(const SkMatrix44& matrix); | 48 virtual void appendTransformItem(const SkMatrix44& matrix); |
| 47 virtual void appendEndTransformItem(); | 49 virtual void appendEndTransformItem(); |
| 48 virtual void appendTransparencyItem(float opacity, | 50 virtual void appendTransparencyItem(float opacity, |
| 49 blink::WebBlendMode blend_mode); | 51 blink::WebBlendMode blend_mode); |
| 50 virtual void appendEndTransparencyItem(); | 52 virtual void appendEndTransparencyItem(); |
| 51 virtual void appendFilterItem(SkImageFilter* filter, | 53 virtual void appendFilterItem(SkImageFilter* filter, |
| 52 const blink::WebFloatRect& bounds); | 54 const blink::WebFloatRect& bounds); |
| 53 virtual void appendEndFilterItem(); | 55 virtual void appendEndFilterItem(); |
| 54 | 56 |
| 55 private: | 57 private: |
| 56 scoped_refptr<cc::DisplayItemList> display_item_list_; | 58 scoped_refptr<cc::DisplayItemList> display_item_list_; |
| 57 | 59 |
| 58 DISALLOW_COPY_AND_ASSIGN(WebDisplayItemListImpl); | 60 DISALLOW_COPY_AND_ASSIGN(WebDisplayItemListImpl); |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 } // namespace cc_blink | 63 } // namespace cc_blink |
| 62 | 64 |
| 63 #endif // CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_ | 65 #endif // CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_ |
| OLD | NEW |