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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 if (CleanUpStarted()) | 290 if (CleanUpStarted()) |
291 return; | 291 return; |
292 gpu::Mailbox gpu_mailbox; | 292 gpu::Mailbox gpu_mailbox; |
293 std::ostringstream name_stream; | 293 std::ostringstream name_stream; |
294 name_stream << "name" << next_fence_sync_; | 294 name_stream << "name" << next_fence_sync_; |
295 gpu_mailbox.SetName( | 295 gpu_mailbox.SetName( |
296 reinterpret_cast<const int8_t*>(name_stream.str().c_str())); | 296 reinterpret_cast<const int8_t*>(name_stream.str().c_str())); |
297 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( | 297 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( |
298 base::Bind(&EmptyReleaseCallback)); | 298 base::Bind(&EmptyReleaseCallback)); |
299 | 299 |
300 gpu::SyncToken next_sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, 1, | 300 gpu::SyncToken next_sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, |
| 301 gpu::CommandBufferId::FromUnsafeValue(1), |
301 next_fence_sync_); | 302 next_fence_sync_); |
302 next_sync_token.SetVerifyFlush(); | 303 next_sync_token.SetVerifyFlush(); |
303 TextureMailbox mailbox(gpu_mailbox, next_sync_token, GL_TEXTURE_2D); | 304 TextureMailbox mailbox(gpu_mailbox, next_sync_token, GL_TEXTURE_2D); |
304 next_fence_sync_++; | 305 next_fence_sync_++; |
305 | 306 |
306 tab_contents_->SetTextureMailbox(mailbox, std::move(callback)); | 307 tab_contents_->SetTextureMailbox(mailbox, std::move(callback)); |
307 } | 308 } |
308 | 309 |
309 void DidCommit() override { | 310 void DidCommit() override { |
310 if (CleanUpStarted()) | 311 if (CleanUpStarted()) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) { | 346 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) { |
346 begin_frame_driven_drawing_ = true; | 347 begin_frame_driven_drawing_ = true; |
347 measure_commit_cost_ = true; | 348 measure_commit_cost_ = true; |
348 SetTestName("heavy_page"); | 349 SetTestName("heavy_page"); |
349 ReadTestFile("heavy_layer_tree"); | 350 ReadTestFile("heavy_layer_tree"); |
350 RunTest(CompositorMode::THREADED, false); | 351 RunTest(CompositorMode::THREADED, false); |
351 } | 352 } |
352 | 353 |
353 } // namespace | 354 } // namespace |
354 } // namespace cc | 355 } // namespace cc |
OLD | NEW |