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

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

Issue 49163004: cc: Reduce command buffer flushes related to creating texture ids. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 reduce_memory_result_(true), 85 reduce_memory_result_(true),
86 current_limit_bytes_(0), 86 current_limit_bytes_(0),
87 current_priority_cutoff_value_(0) { 87 current_priority_cutoff_value_(0) {
88 media::InitializeMediaLibraryForTesting(); 88 media::InitializeMediaLibraryForTesting();
89 } 89 }
90 90
91 virtual void SetUp() OVERRIDE { 91 virtual void SetUp() OVERRIDE {
92 LayerTreeSettings settings; 92 LayerTreeSettings settings;
93 settings.minimum_occlusion_tracking_size = gfx::Size(); 93 settings.minimum_occlusion_tracking_size = gfx::Size();
94 settings.impl_side_painting = true; 94 settings.impl_side_painting = true;
95 settings.texture_id_allocation_chunk_size = 1;
95 96
96 host_impl_ = LayerTreeHostImpl::Create( 97 host_impl_ = LayerTreeHostImpl::Create(
97 settings, this, &proxy_, &stats_instrumentation_, NULL); 98 settings, this, &proxy_, &stats_instrumentation_, NULL);
98 host_impl_->InitializeRenderer(CreateOutputSurface()); 99 host_impl_->InitializeRenderer(CreateOutputSurface());
99 host_impl_->SetViewportSize(gfx::Size(10, 10)); 100 host_impl_->SetViewportSize(gfx::Size(10, 10));
100 } 101 }
101 102
102 virtual void TearDown() OVERRIDE {} 103 virtual void TearDown() OVERRIDE {}
103 104
104 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE { 105 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {
(...skipping 5360 matching lines...) Expand 10 before | Expand all | Expand 10 after
5465 // The root should have scrolled. 5466 // The root should have scrolled.
5466 ASSERT_EQ(2u, scroll_info->scrolls.size()); 5467 ASSERT_EQ(2u, scroll_info->scrolls.size());
5467 ExpectContains(*scroll_info.get(), 5468 ExpectContains(*scroll_info.get(),
5468 host_impl_->active_tree()->root_layer()->id(), 5469 host_impl_->active_tree()->root_layer()->id(),
5469 gfx::Vector2d(0, 10)); 5470 gfx::Vector2d(0, 10));
5470 } 5471 }
5471 } 5472 }
5472 5473
5473 } // namespace 5474 } // namespace
5474 } // namespace cc 5475 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698