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

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

Issue 2857363004: Add buffer_to_texture_target_map to LayerTreeSettings (Closed)
Patch Set: Address comments in CompositorImpl Created 3 years, 7 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/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/layer_tree_settings.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 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 copy_layer_ = FakePictureLayer::Create(&client_); 458 copy_layer_ = FakePictureLayer::Create(&client_);
459 copy_layer_->SetBounds(gfx::Size(10, 10)); 459 copy_layer_->SetBounds(gfx::Size(10, 10));
460 parent_layer_->AddChild(copy_layer_); 460 parent_layer_->AddChild(copy_layer_);
461 461
462 layer_tree_host()->SetRootLayer(root_); 462 layer_tree_host()->SetRootLayer(root_);
463 LayerTreeHostCopyRequestTest::SetupTree(); 463 LayerTreeHostCopyRequestTest::SetupTree();
464 client_.set_bounds(root_->bounds()); 464 client_.set_bounds(root_->bounds());
465 } 465 }
466 466
467 std::unique_ptr<TestCompositorFrameSink> CreateCompositorFrameSink( 467 std::unique_ptr<TestCompositorFrameSink> CreateCompositorFrameSink(
468 const RendererSettings& renderer_settings,
468 scoped_refptr<ContextProvider> compositor_context_provider, 469 scoped_refptr<ContextProvider> compositor_context_provider,
469 scoped_refptr<ContextProvider> worker_context_provider) override { 470 scoped_refptr<ContextProvider> worker_context_provider) override {
470 auto frame_sink = LayerTreeHostCopyRequestTest::CreateCompositorFrameSink( 471 auto frame_sink = LayerTreeHostCopyRequestTest::CreateCompositorFrameSink(
471 std::move(compositor_context_provider), 472 renderer_settings, std::move(compositor_context_provider),
472 std::move(worker_context_provider)); 473 std::move(worker_context_provider));
473 frame_sink_ = frame_sink.get(); 474 frame_sink_ = frame_sink.get();
474 return frame_sink; 475 return frame_sink;
475 } 476 }
476 477
477 void BeginTest() override { 478 void BeginTest() override {
478 PostSetNeedsCommitToMainThread(); 479 PostSetNeedsCommitToMainThread();
479 480
480 copy_layer_->RequestCopyOfOutput( 481 copy_layer_->RequestCopyOfOutput(
481 CopyOutputRequest::CreateBitmapRequest(base::Bind( 482 CopyOutputRequest::CreateBitmapRequest(base::Bind(
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 int num_draws_; 1320 int num_draws_;
1320 bool copy_happened_; 1321 bool copy_happened_;
1321 bool draw_happened_; 1322 bool draw_happened_;
1322 }; 1323 };
1323 1324
1324 SINGLE_AND_MULTI_THREAD_TEST_F( 1325 SINGLE_AND_MULTI_THREAD_TEST_F(
1325 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); 1326 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest);
1326 1327
1327 } // namespace 1328 } // namespace
1328 } // namespace cc 1329 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698