| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "cc/layers/content_layer.h" | 8 #include "cc/layers/content_layer.h" |
| 9 #include "cc/layers/delegated_frame_provider.h" | 9 #include "cc/layers/delegated_frame_provider.h" |
| 10 #include "cc/layers/delegated_frame_resource_collection.h" | 10 #include "cc/layers/delegated_frame_resource_collection.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "cc/test/render_pass_test_common.h" | 34 #include "cc/test/render_pass_test_common.h" |
| 35 #include "cc/test/test_context_provider.h" | 35 #include "cc/test/test_context_provider.h" |
| 36 #include "cc/test/test_web_graphics_context_3d.h" | 36 #include "cc/test/test_web_graphics_context_3d.h" |
| 37 #include "cc/trees/layer_tree_host_impl.h" | 37 #include "cc/trees/layer_tree_host_impl.h" |
| 38 #include "cc/trees/layer_tree_impl.h" | 38 #include "cc/trees/layer_tree_impl.h" |
| 39 #include "cc/trees/single_thread_proxy.h" | 39 #include "cc/trees/single_thread_proxy.h" |
| 40 #include "gpu/GLES2/gl2extchromium.h" | 40 #include "gpu/GLES2/gl2extchromium.h" |
| 41 #include "media/base/media.h" | 41 #include "media/base/media.h" |
| 42 | 42 |
| 43 using media::VideoFrame; | 43 using media::VideoFrame; |
| 44 using WebKit::WebGraphicsContext3D; | 44 using blink::WebGraphicsContext3D; |
| 45 | 45 |
| 46 namespace cc { | 46 namespace cc { |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| 49 // These tests deal with losing the 3d graphics context. | 49 // These tests deal with losing the 3d graphics context. |
| 50 class LayerTreeHostContextTest : public LayerTreeTest { | 50 class LayerTreeHostContextTest : public LayerTreeTest { |
| 51 public: | 51 public: |
| 52 LayerTreeHostContextTest() | 52 LayerTreeHostContextTest() |
| 53 : LayerTreeTest(), | 53 : LayerTreeTest(), |
| 54 context3d_(NULL), | 54 context3d_(NULL), |
| (...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 ResourceProvider::Create(child_output_surface_.get(), | 1094 ResourceProvider::Create(child_output_surface_.get(), |
| 1095 NULL, | 1095 NULL, |
| 1096 0, | 1096 0, |
| 1097 false, | 1097 false, |
| 1098 1); | 1098 1); |
| 1099 } | 1099 } |
| 1100 | 1100 |
| 1101 static void EmptyReleaseCallback(unsigned sync_point, bool lost) {} | 1101 static void EmptyReleaseCallback(unsigned sync_point, bool lost) {} |
| 1102 | 1102 |
| 1103 virtual void SetupTree() OVERRIDE { | 1103 virtual void SetupTree() OVERRIDE { |
| 1104 WebKit::WebGraphicsContext3D* context3d = | 1104 blink::WebGraphicsContext3D* context3d = |
| 1105 child_output_surface_->context_provider()->Context3d(); | 1105 child_output_surface_->context_provider()->Context3d(); |
| 1106 | 1106 |
| 1107 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); | 1107 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); |
| 1108 | 1108 |
| 1109 scoped_ptr<TestRenderPass> pass_for_quad = TestRenderPass::Create(); | 1109 scoped_ptr<TestRenderPass> pass_for_quad = TestRenderPass::Create(); |
| 1110 pass_for_quad->SetNew( | 1110 pass_for_quad->SetNew( |
| 1111 // AppendOneOfEveryQuadType() makes a RenderPass quad with this id. | 1111 // AppendOneOfEveryQuadType() makes a RenderPass quad with this id. |
| 1112 RenderPass::Id(2, 1), | 1112 RenderPass::Id(2, 1), |
| 1113 gfx::Rect(0, 0, 10, 10), | 1113 gfx::Rect(0, 0, 10, 10), |
| 1114 gfx::Rect(0, 0, 10, 10), | 1114 gfx::Rect(0, 0, 10, 10), |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2291 protected: | 2291 protected: |
| 2292 FakeContentLayerClient client_; | 2292 FakeContentLayerClient client_; |
| 2293 scoped_refptr<FakeContentLayer> layer_; | 2293 scoped_refptr<FakeContentLayer> layer_; |
| 2294 int num_commits_; | 2294 int num_commits_; |
| 2295 }; | 2295 }; |
| 2296 | 2296 |
| 2297 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestSurfaceCreateCallback); | 2297 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestSurfaceCreateCallback); |
| 2298 | 2298 |
| 2299 } // namespace | 2299 } // namespace |
| 2300 } // namespace cc | 2300 } // namespace cc |
| OLD | NEW |