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

Side by Side Diff: cc/layers/tiled_layer_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 | « no previous file | cc/output/gl_renderer_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/layers/tiled_layer.h" 5 #include "cc/layers/tiled_layer.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/debug/overdraw_metrics.h" 10 #include "cc/debug/overdraw_metrics.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 resource_manager_ = PrioritizedResourceManager::Create(proxy_); 67 resource_manager_ = PrioritizedResourceManager::Create(proxy_);
68 layer_tree_host_->SetLayerTreeHostClientReady(); 68 layer_tree_host_->SetLayerTreeHostClientReady();
69 layer_tree_host_->InitializeOutputSurfaceIfNeeded(); 69 layer_tree_host_->InitializeOutputSurfaceIfNeeded();
70 layer_tree_host_->SetRootLayer(Layer::Create()); 70 layer_tree_host_->SetRootLayer(Layer::Create());
71 71
72 CHECK(output_surface_->BindToClient(&output_surface_client_)); 72 CHECK(output_surface_->BindToClient(&output_surface_client_));
73 73
74 DebugScopedSetImplThreadAndMainThreadBlocked 74 DebugScopedSetImplThreadAndMainThreadBlocked
75 impl_thread_and_main_thread_blocked(proxy_); 75 impl_thread_and_main_thread_blocked(proxy_);
76 resource_provider_ = 76 resource_provider_ =
77 ResourceProvider::Create(output_surface_.get(), NULL, 0, false); 77 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
78 host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(proxy_)); 78 host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(proxy_));
79 } 79 }
80 80
81 virtual ~TiledLayerTest() { 81 virtual ~TiledLayerTest() {
82 ResourceManagerClearAllMemory(resource_manager_.get(), 82 ResourceManagerClearAllMemory(resource_manager_.get(),
83 resource_provider_.get()); 83 resource_provider_.get());
84 84
85 DebugScopedSetImplThreadAndMainThreadBlocked 85 DebugScopedSetImplThreadAndMainThreadBlocked
86 impl_thread_and_main_thread_blocked(proxy_); 86 impl_thread_and_main_thread_blocked(proxy_);
87 resource_provider_.reset(); 87 resource_provider_.reset();
(...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 // Invalidate the entire layer in layer space. When painting, the rect given 1946 // Invalidate the entire layer in layer space. When painting, the rect given
1947 // to webkit should match the layer's bounds. 1947 // to webkit should match the layer's bounds.
1948 layer->SetNeedsDisplayRect(layer_rect); 1948 layer->SetNeedsDisplayRect(layer_rect);
1949 layer->Update(queue_.get(), NULL); 1949 layer->Update(queue_.get(), NULL);
1950 1950
1951 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); 1951 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect());
1952 } 1952 }
1953 1953
1954 } // namespace 1954 } // namespace
1955 } // namespace cc 1955 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698