| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "webkit/support/web_layer_tree_view_impl_for_testing.h" | 5 #include "webkit/support/web_layer_tree_view_impl_for_testing.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "cc/base/switches.h" | 10 #include "cc/base/switches.h" |
| 11 #include "cc/debug/fake_web_graphics_context_3d.h" | 11 #include "cc/debug/test_context_provider.h" |
| 12 #include "cc/input/input_handler.h" | 12 #include "cc/input/input_handler.h" |
| 13 #include "cc/layers/layer.h" | 13 #include "cc/layers/layer.h" |
| 14 #include "cc/output/context_provider.h" | |
| 15 #include "cc/output/output_surface.h" | 14 #include "cc/output/output_surface.h" |
| 16 #include "cc/output/software_output_device.h" | |
| 17 #include "cc/trees/layer_tree_host.h" | 15 #include "cc/trees/layer_tree_host.h" |
| 18 #include "third_party/WebKit/public/platform/Platform.h" | 16 #include "third_party/WebKit/public/platform/Platform.h" |
| 19 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 17 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 20 #include "third_party/WebKit/public/platform/WebLayer.h" | 18 #include "third_party/WebKit/public/platform/WebLayer.h" |
| 21 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" | 19 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" |
| 22 #include "third_party/WebKit/public/platform/WebRenderingStats.h" | 20 #include "third_party/WebKit/public/platform/WebRenderingStats.h" |
| 23 #include "third_party/WebKit/public/platform/WebSize.h" | 21 #include "third_party/WebKit/public/platform/WebSize.h" |
| 24 #include "webkit/common/gpu/test_context_provider_factory.h" | 22 #include "webkit/common/gpu/test_context_provider_factory.h" |
| 25 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" | 23 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" |
| 26 #include "webkit/support/test_webkit_platform_support.h" | 24 #include "webkit/support/test_webkit_platform_support.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 150 |
| 153 void WebLayerTreeViewImplForTesting::Layout() { | 151 void WebLayerTreeViewImplForTesting::Layout() { |
| 154 } | 152 } |
| 155 | 153 |
| 156 void WebLayerTreeViewImplForTesting::ApplyScrollAndScale( | 154 void WebLayerTreeViewImplForTesting::ApplyScrollAndScale( |
| 157 gfx::Vector2d scroll_delta, | 155 gfx::Vector2d scroll_delta, |
| 158 float page_scale) {} | 156 float page_scale) {} |
| 159 | 157 |
| 160 scoped_ptr<cc::OutputSurface> | 158 scoped_ptr<cc::OutputSurface> |
| 161 WebLayerTreeViewImplForTesting::CreateOutputSurface(bool fallback) { | 159 WebLayerTreeViewImplForTesting::CreateOutputSurface(bool fallback) { |
| 162 scoped_ptr<cc::OutputSurface> surface; | 160 return make_scoped_ptr( |
| 163 scoped_ptr<WebGraphicsContext3D> context3d( | 161 new cc::OutputSurface(cc::TestContextProvider::Create())); |
| 164 new cc::FakeWebGraphicsContext3D); | |
| 165 surface.reset(new cc::OutputSurface(context3d.Pass())); | |
| 166 return surface.Pass(); | |
| 167 } | 162 } |
| 168 | 163 |
| 169 void WebLayerTreeViewImplForTesting::ScheduleComposite() { | 164 void WebLayerTreeViewImplForTesting::ScheduleComposite() { |
| 170 } | 165 } |
| 171 | 166 |
| 172 scoped_refptr<cc::ContextProvider> | 167 scoped_refptr<cc::ContextProvider> |
| 173 WebLayerTreeViewImplForTesting::OffscreenContextProviderForMainThread() { | 168 WebLayerTreeViewImplForTesting::OffscreenContextProviderForMainThread() { |
| 174 return webkit::gpu::TestContextProviderFactory::GetInstance()-> | 169 return webkit::gpu::TestContextProviderFactory::GetInstance()-> |
| 175 OffscreenContextProviderForMainThread(); | 170 OffscreenContextProviderForMainThread(); |
| 176 } | 171 } |
| 177 | 172 |
| 178 scoped_refptr<cc::ContextProvider> | 173 scoped_refptr<cc::ContextProvider> |
| 179 WebLayerTreeViewImplForTesting::OffscreenContextProviderForCompositorThread() { | 174 WebLayerTreeViewImplForTesting::OffscreenContextProviderForCompositorThread() { |
| 180 NOTREACHED(); | 175 NOTREACHED(); |
| 181 return NULL; | 176 return NULL; |
| 182 } | 177 } |
| 183 | 178 |
| 184 } // namespace webkit | 179 } // namespace webkit |
| OLD | NEW |