| 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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 pass->AppendOneOfEveryQuadType(child_resource_provider_.get(), | 997 pass->AppendOneOfEveryQuadType(child_resource_provider_.get(), |
| 998 RenderPassId(2, 1)); | 998 RenderPassId(2, 1)); |
| 999 | 999 |
| 1000 frame_data->render_pass_list.push_back(pass_for_quad.Pass()); | 1000 frame_data->render_pass_list.push_back(pass_for_quad.Pass()); |
| 1001 frame_data->render_pass_list.push_back(pass.Pass()); | 1001 frame_data->render_pass_list.push_back(pass.Pass()); |
| 1002 | 1002 |
| 1003 delegated_resource_collection_ = new DelegatedFrameResourceCollection; | 1003 delegated_resource_collection_ = new DelegatedFrameResourceCollection; |
| 1004 delegated_frame_provider_ = new DelegatedFrameProvider( | 1004 delegated_frame_provider_ = new DelegatedFrameProvider( |
| 1005 delegated_resource_collection_.get(), frame_data.Pass()); | 1005 delegated_resource_collection_.get(), frame_data.Pass()); |
| 1006 | 1006 |
| 1007 ResourceProvider::ResourceId resource = | 1007 ResourceId resource = child_resource_provider_->CreateResource( |
| 1008 child_resource_provider_->CreateResource( | 1008 gfx::Size(4, 4), GL_CLAMP_TO_EDGE, |
| 1009 gfx::Size(4, 4), GL_CLAMP_TO_EDGE, | 1009 ResourceProvider::TEXTURE_HINT_IMMUTABLE, RGBA_8888); |
| 1010 ResourceProvider::TEXTURE_HINT_IMMUTABLE, RGBA_8888); | |
| 1011 ResourceProvider::ScopedWriteLockGL lock(child_resource_provider_.get(), | 1010 ResourceProvider::ScopedWriteLockGL lock(child_resource_provider_.get(), |
| 1012 resource); | 1011 resource); |
| 1013 | 1012 |
| 1014 gpu::Mailbox mailbox; | 1013 gpu::Mailbox mailbox; |
| 1015 gl->GenMailboxCHROMIUM(mailbox.name); | 1014 gl->GenMailboxCHROMIUM(mailbox.name); |
| 1016 GLuint sync_point = gl->InsertSyncPointCHROMIUM(); | 1015 GLuint sync_point = gl->InsertSyncPointCHROMIUM(); |
| 1017 | 1016 |
| 1018 scoped_refptr<Layer> root = Layer::Create(); | 1017 scoped_refptr<Layer> root = Layer::Create(); |
| 1019 root->SetBounds(gfx::Size(10, 10)); | 1018 root->SetBounds(gfx::Size(10, 10)); |
| 1020 root->SetIsDrawable(true); | 1019 root->SetIsDrawable(true); |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1798 void AfterTest() override {} | 1797 void AfterTest() override {} |
| 1799 | 1798 |
| 1800 bool deferred_; | 1799 bool deferred_; |
| 1801 }; | 1800 }; |
| 1802 | 1801 |
| 1803 SINGLE_AND_MULTI_THREAD_TEST_F( | 1802 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 1804 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); | 1803 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); |
| 1805 | 1804 |
| 1806 } // namespace | 1805 } // namespace |
| 1807 } // namespace cc | 1806 } // namespace cc |
| OLD | NEW |