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