| 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 <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 std::ostringstream name_stream; | 290 std::ostringstream name_stream; |
| 291 name_stream << "name" << next_sync_point_; | 291 name_stream << "name" << next_sync_point_; |
| 292 gpu_mailbox.SetName( | 292 gpu_mailbox.SetName( |
| 293 reinterpret_cast<const int8*>(name_stream.str().c_str())); | 293 reinterpret_cast<const int8*>(name_stream.str().c_str())); |
| 294 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( | 294 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( |
| 295 base::Bind(&EmptyReleaseCallback)); | 295 base::Bind(&EmptyReleaseCallback)); |
| 296 TextureMailbox mailbox(gpu_mailbox, gpu::SyncToken(next_sync_point_), | 296 TextureMailbox mailbox(gpu_mailbox, gpu::SyncToken(next_sync_point_), |
| 297 GL_TEXTURE_2D); | 297 GL_TEXTURE_2D); |
| 298 next_sync_point_++; | 298 next_sync_point_++; |
| 299 | 299 |
| 300 tab_contents_->SetTextureMailbox(mailbox, callback.Pass()); | 300 tab_contents_->SetTextureMailbox(mailbox, std::move(callback)); |
| 301 } | 301 } |
| 302 | 302 |
| 303 void DidCommit() override { | 303 void DidCommit() override { |
| 304 if (CleanUpStarted()) | 304 if (CleanUpStarted()) |
| 305 return; | 305 return; |
| 306 layer_tree_host()->SetNeedsCommit(); | 306 layer_tree_host()->SetNeedsCommit(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 void CleanUpAndEndTest(LayerTreeHostImpl* host_impl) override { | 309 void CleanUpAndEndTest(LayerTreeHostImpl* host_impl) override { |
| 310 clean_up_started_ = true; | 310 clean_up_started_ = true; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 339 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) { | 339 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreaded) { |
| 340 begin_frame_driven_drawing_ = true; | 340 begin_frame_driven_drawing_ = true; |
| 341 measure_commit_cost_ = true; | 341 measure_commit_cost_ = true; |
| 342 SetTestName("heavy_page"); | 342 SetTestName("heavy_page"); |
| 343 ReadTestFile("heavy_layer_tree"); | 343 ReadTestFile("heavy_layer_tree"); |
| 344 RunTest(true, false); | 344 RunTest(true, false); |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace | 347 } // namespace |
| 348 } // namespace cc | 348 } // namespace cc |
| OLD | NEW |