Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: cc/trees/layer_tree_host_perftest.cc

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Patch Set: Rebasing... Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/test_web_graphics_context_3d.cc ('k') | components/mus/gles2/command_buffer_driver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/test/test_web_graphics_context_3d.cc ('k') | components/mus/gles2/command_buffer_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698