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

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

Issue 670183003: Update from chromium 62675d9fb31fb8cedc40f68e78e8445a74f362e7 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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_impl.h ('k') | cc/trees/layer_tree_host_impl_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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 #include "cc/trees/layer_tree_host.h" 65 #include "cc/trees/layer_tree_host.h"
66 #include "cc/trees/layer_tree_host_common.h" 66 #include "cc/trees/layer_tree_host_common.h"
67 #include "cc/trees/layer_tree_impl.h" 67 #include "cc/trees/layer_tree_impl.h"
68 #include "cc/trees/occlusion_tracker.h" 68 #include "cc/trees/occlusion_tracker.h"
69 #include "cc/trees/single_thread_proxy.h" 69 #include "cc/trees/single_thread_proxy.h"
70 #include "cc/trees/tree_synchronizer.h" 70 #include "cc/trees/tree_synchronizer.h"
71 #include "gpu/command_buffer/client/gles2_interface.h" 71 #include "gpu/command_buffer/client/gles2_interface.h"
72 #include "gpu/GLES2/gl2extchromium.h" 72 #include "gpu/GLES2/gl2extchromium.h"
73 #include "ui/gfx/frame_time.h" 73 #include "ui/gfx/frame_time.h"
74 #include "ui/gfx/geometry/rect_conversions.h" 74 #include "ui/gfx/geometry/rect_conversions.h"
75 #include "ui/gfx/size_conversions.h" 75 #include "ui/gfx/geometry/size_conversions.h"
76 #include "ui/gfx/vector2d_conversions.h" 76 #include "ui/gfx/geometry/vector2d_conversions.h"
77 77
78 namespace cc { 78 namespace cc {
79 namespace { 79 namespace {
80 80
81 // Small helper class that saves the current viewport location as the user sees 81 // Small helper class that saves the current viewport location as the user sees
82 // it and resets to the same location. 82 // it and resets to the same location.
83 class ViewportAnchor { 83 class ViewportAnchor {
84 public: 84 public:
85 ViewportAnchor(LayerImpl* inner_scroll, LayerImpl* outer_scroll) 85 ViewportAnchor(LayerImpl* inner_scroll, LayerImpl* outer_scroll)
86 : inner_(inner_scroll), 86 : inner_(inner_scroll),
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after
2072 context_provider, 2072 context_provider,
2073 resource_provider_.get(), 2073 resource_provider_.get(),
2074 GetMaxTransferBufferUsageBytes(context_provider->ContextCapabilities(), 2074 GetMaxTransferBufferUsageBytes(context_provider->ContextCapabilities(),
2075 settings_.refresh_rate)); 2075 settings_.refresh_rate));
2076 } 2076 }
2077 2077
2078 tile_manager_ = TileManager::Create(this, 2078 tile_manager_ = TileManager::Create(this,
2079 task_runner, 2079 task_runner,
2080 resource_pool_.get(), 2080 resource_pool_.get(),
2081 raster_worker_pool_->AsRasterizer(), 2081 raster_worker_pool_->AsRasterizer(),
2082 rendering_stats_instrumentation_); 2082 rendering_stats_instrumentation_,
2083 settings().scheduled_raster_task_limit);
2083 2084
2084 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); 2085 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy());
2085 need_to_update_visible_tiles_before_draw_ = false; 2086 need_to_update_visible_tiles_before_draw_ = false;
2086 } 2087 }
2087 2088
2088 void LayerTreeHostImpl::DestroyTileManager() { 2089 void LayerTreeHostImpl::DestroyTileManager() {
2089 tile_manager_ = nullptr; 2090 tile_manager_ = nullptr;
2090 resource_pool_ = nullptr; 2091 resource_pool_ = nullptr;
2091 staging_resource_pool_ = nullptr; 2092 staging_resource_pool_ = nullptr;
2092 raster_worker_pool_ = nullptr; 2093 raster_worker_pool_ = nullptr;
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
3477 } 3478 }
3478 3479
3479 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3480 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3480 std::vector<PictureLayerImpl*>::iterator it = 3481 std::vector<PictureLayerImpl*>::iterator it =
3481 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3482 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3482 DCHECK(it != picture_layers_.end()); 3483 DCHECK(it != picture_layers_.end());
3483 picture_layers_.erase(it); 3484 picture_layers_.erase(it);
3484 } 3485 }
3485 3486
3486 } // namespace cc 3487 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698