| 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 "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 root_pass->shared_quad_state_list.push_back(shared_quad_state.Pass()); | 128 root_pass->shared_quad_state_list.push_back(shared_quad_state.Pass()); |
| 129 | 129 |
| 130 frame->render_pass_list.push_back(root_pass.Pass()); | 130 frame->render_pass_list.push_back(root_pass.Pass()); |
| 131 return frame.Pass(); | 131 return frame.Pass(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void AddTransferableResource(DelegatedFrameData* frame, | 134 void AddTransferableResource(DelegatedFrameData* frame, |
| 135 ResourceProvider::ResourceId resource_id) { | 135 ResourceProvider::ResourceId resource_id) { |
| 136 TransferableResource resource; | 136 TransferableResource resource; |
| 137 resource.id = resource_id; | 137 resource.id = resource_id; |
| 138 resource.target = GL_TEXTURE_2D; | 138 resource.mailbox_holder.texture_target = GL_TEXTURE_2D; |
| 139 GLbyte arbitrary_mailbox[64] = { | 139 GLbyte arbitrary_mailbox[64] = { |
| 140 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, | 140 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, |
| 141 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, | 141 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, |
| 142 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, | 142 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, |
| 143 1, 2, 3, 4 | 143 1, 2, 3, 4 |
| 144 }; | 144 }; |
| 145 resource.mailbox.SetName(arbitrary_mailbox); | 145 resource.mailbox_holder.mailbox.SetName(arbitrary_mailbox); |
| 146 frame->resource_list.push_back(resource); | 146 frame->resource_list.push_back(resource); |
| 147 } | 147 } |
| 148 | 148 |
| 149 void AddTextureQuad(DelegatedFrameData* frame, | 149 void AddTextureQuad(DelegatedFrameData* frame, |
| 150 ResourceProvider::ResourceId resource_id) { | 150 ResourceProvider::ResourceId resource_id) { |
| 151 scoped_ptr<SharedQuadState> sqs = SharedQuadState::Create(); | 151 scoped_ptr<SharedQuadState> sqs = SharedQuadState::Create(); |
| 152 scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create(); | 152 scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create(); |
| 153 float vertex_opacity[4] = { 1.f, 1.f, 1.f, 1.f }; | 153 float vertex_opacity[4] = { 1.f, 1.f, 1.f, 1.f }; |
| 154 quad->SetNew(sqs.get(), | 154 quad->SetNew(sqs.get(), |
| 155 gfx::Rect(0, 0, 10, 10), | 155 gfx::Rect(0, 0, 10, 10), |
| (...skipping 2179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2335 } | 2335 } |
| 2336 | 2336 |
| 2337 scoped_refptr<DelegatedRendererLayer> delegated_thief_; | 2337 scoped_refptr<DelegatedRendererLayer> delegated_thief_; |
| 2338 }; | 2338 }; |
| 2339 | 2339 |
| 2340 SINGLE_AND_MULTI_THREAD_TEST_F( | 2340 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 2341 LayerTreeHostDelegatedTestRemoveAndChangeResources); | 2341 LayerTreeHostDelegatedTestRemoveAndChangeResources); |
| 2342 | 2342 |
| 2343 } // namespace | 2343 } // namespace |
| 2344 } // namespace cc | 2344 } // namespace cc |
| OLD | NEW |