| 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 #include "cc/blink/web_compositor_support_impl.h" | 5 #include "cc/blink/web_compositor_support_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "cc/blink/web_content_layer_impl.h" | 9 #include "cc/blink/web_content_layer_impl.h" |
| 10 #include "cc/blink/web_display_item_list_impl.h" | 10 #include "cc/blink/web_display_item_list_impl.h" |
| 11 #include "cc/blink/web_external_texture_layer_impl.h" | 11 #include "cc/blink/web_external_texture_layer_impl.h" |
| 12 #include "cc/blink/web_image_layer_impl.h" | 12 #include "cc/blink/web_image_layer_impl.h" |
| 13 #include "cc/blink/web_layer_impl.h" | 13 #include "cc/blink/web_layer_impl.h" |
| 14 #include "cc/blink/web_scrollbar_layer_impl.h" | 14 #include "cc/blink/web_scrollbar_layer_impl.h" |
| 15 #include "cc/layers/layer.h" | 15 #include "cc/layers/layer.h" |
| 16 #include "cc/output/output_surface.h" | 16 #include "cc/output/output_surface.h" |
| 17 #include "cc/output/software_output_device.h" | 17 #include "cc/output/software_output_device.h" |
| 18 | 18 |
| 19 using blink::WebContentLayer; | 19 using blink::WebContentLayer; |
| 20 using blink::WebContentLayerClient; | 20 using blink::WebContentLayerClient; |
| 21 using blink::WebDisplayItemList; | 21 using blink::WebDisplayItemList; |
| 22 using blink::WebExternalTextureLayer; | 22 using blink::WebExternalTextureLayer; |
| 23 using blink::WebExternalTextureLayerClient; | |
| 24 using blink::WebImageLayer; | 23 using blink::WebImageLayer; |
| 25 using blink::WebLayer; | 24 using blink::WebLayer; |
| 26 using blink::WebScrollbar; | 25 using blink::WebScrollbar; |
| 27 using blink::WebScrollbarLayer; | 26 using blink::WebScrollbarLayer; |
| 28 using blink::WebScrollbarThemeGeometry; | 27 using blink::WebScrollbarThemeGeometry; |
| 29 using blink::WebScrollbarThemePainter; | 28 using blink::WebScrollbarThemePainter; |
| 30 | 29 |
| 31 namespace cc_blink { | 30 namespace cc_blink { |
| 32 | 31 |
| 33 WebCompositorSupportImpl::WebCompositorSupportImpl() { | 32 WebCompositorSupportImpl::WebCompositorSupportImpl() { |
| 34 } | 33 } |
| 35 | 34 |
| 36 WebCompositorSupportImpl::~WebCompositorSupportImpl() { | 35 WebCompositorSupportImpl::~WebCompositorSupportImpl() { |
| 37 } | 36 } |
| 38 | 37 |
| 39 WebLayer* WebCompositorSupportImpl::createLayer() { | 38 WebLayer* WebCompositorSupportImpl::createLayer() { |
| 40 return new WebLayerImpl(); | 39 return new WebLayerImpl(); |
| 41 } | 40 } |
| 42 | 41 |
| 43 WebLayer* WebCompositorSupportImpl::createLayerFromCCLayer(cc::Layer* layer) { | 42 WebLayer* WebCompositorSupportImpl::createLayerFromCCLayer(cc::Layer* layer) { |
| 44 return new WebLayerImpl(layer); | 43 return new WebLayerImpl(layer); |
| 45 } | 44 } |
| 46 | 45 |
| 47 WebContentLayer* WebCompositorSupportImpl::createContentLayer( | 46 WebContentLayer* WebCompositorSupportImpl::createContentLayer( |
| 48 WebContentLayerClient* client) { | 47 WebContentLayerClient* client) { |
| 49 return new WebContentLayerImpl(client); | 48 return new WebContentLayerImpl(client); |
| 50 } | 49 } |
| 51 | 50 |
| 52 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer( | 51 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer( |
| 53 WebExternalTextureLayerClient* client) { | 52 cc::TextureLayerClient* client) { |
| 54 return new WebExternalTextureLayerImpl(client); | 53 return new WebExternalTextureLayerImpl(client); |
| 55 } | 54 } |
| 56 | 55 |
| 57 blink::WebImageLayer* WebCompositorSupportImpl::createImageLayer() { | 56 blink::WebImageLayer* WebCompositorSupportImpl::createImageLayer() { |
| 58 return new WebImageLayerImpl(); | 57 return new WebImageLayerImpl(); |
| 59 } | 58 } |
| 60 | 59 |
| 61 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( | 60 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer( |
| 62 WebScrollbar* scrollbar, | 61 WebScrollbar* scrollbar, |
| 63 WebScrollbarThemePainter painter, | 62 WebScrollbarThemePainter painter, |
| 64 WebScrollbarThemeGeometry* geometry) { | 63 WebScrollbarThemeGeometry* geometry) { |
| 65 return new WebScrollbarLayerImpl(scrollbar, painter, geometry); | 64 return new WebScrollbarLayerImpl(scrollbar, painter, geometry); |
| 66 } | 65 } |
| 67 | 66 |
| 68 WebScrollbarLayer* WebCompositorSupportImpl::createSolidColorScrollbarLayer( | 67 WebScrollbarLayer* WebCompositorSupportImpl::createSolidColorScrollbarLayer( |
| 69 WebScrollbar::Orientation orientation, | 68 WebScrollbar::Orientation orientation, |
| 70 int thumb_thickness, | 69 int thumb_thickness, |
| 71 int track_start, | 70 int track_start, |
| 72 bool is_left_side_vertical_scrollbar) { | 71 bool is_left_side_vertical_scrollbar) { |
| 73 return new WebScrollbarLayerImpl(orientation, | 72 return new WebScrollbarLayerImpl(orientation, |
| 74 thumb_thickness, | 73 thumb_thickness, |
| 75 track_start, | 74 track_start, |
| 76 is_left_side_vertical_scrollbar); | 75 is_left_side_vertical_scrollbar); |
| 77 } | 76 } |
| 78 | 77 |
| 79 } // namespace cc_blink | 78 } // namespace cc_blink |
| OLD | NEW |