| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 } | 277 } |
| 278 | 278 |
| 279 void WillCommit() override { | 279 void WillCommit() override { |
| 280 if (CleanUpStarted()) | 280 if (CleanUpStarted()) |
| 281 return; | 281 return; |
| 282 gpu::Mailbox gpu_mailbox; | 282 gpu::Mailbox gpu_mailbox; |
| 283 std::ostringstream name_stream; | 283 std::ostringstream name_stream; |
| 284 name_stream << "name" << next_fence_sync_; | 284 name_stream << "name" << next_fence_sync_; |
| 285 gpu_mailbox.SetName( | 285 gpu_mailbox.SetName( |
| 286 reinterpret_cast<const int8_t*>(name_stream.str().c_str())); | 286 reinterpret_cast<const int8_t*>(name_stream.str().c_str())); |
| 287 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( | 287 std::unique_ptr<SingleReleaseCallback> callback = |
| 288 base::Bind(&EmptyReleaseCallback)); | 288 SingleReleaseCallback::Create(base::Bind(&EmptyReleaseCallback)); |
| 289 | 289 |
| 290 gpu::SyncToken next_sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, | 290 gpu::SyncToken next_sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, |
| 291 gpu::CommandBufferId::FromUnsafeValue(1), | 291 gpu::CommandBufferId::FromUnsafeValue(1), |
| 292 next_fence_sync_); | 292 next_fence_sync_); |
| 293 next_sync_token.SetVerifyFlush(); | 293 next_sync_token.SetVerifyFlush(); |
| 294 TextureMailbox mailbox(gpu_mailbox, next_sync_token, GL_TEXTURE_2D); | 294 TextureMailbox mailbox(gpu_mailbox, next_sync_token, GL_TEXTURE_2D); |
| 295 next_fence_sync_++; | 295 next_fence_sync_++; |
| 296 | 296 |
| 297 tab_contents_->SetTextureMailbox(mailbox, std::move(callback)); | 297 tab_contents_->SetTextureMailbox(mailbox, std::move(callback)); |
| 298 } | 298 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) { | 336 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) { |
| 337 begin_frame_driven_drawing_ = true; | 337 begin_frame_driven_drawing_ = true; |
| 338 measure_commit_cost_ = true; | 338 measure_commit_cost_ = true; |
| 339 SetTestName("heavy_page"); | 339 SetTestName("heavy_page"); |
| 340 ReadTestFile("heavy_layer_tree"); | 340 ReadTestFile("heavy_layer_tree"); |
| 341 RunTest(CompositorMode::THREADED, false); | 341 RunTest(CompositorMode::THREADED, false); |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace | 344 } // namespace |
| 345 } // namespace cc | 345 } // namespace cc |
| OLD | NEW |