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

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

Issue 69343005: Added preliminary support for tile rasterization with Ganesh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ported scissoring fix from gr_layer patch. 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
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 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 active_tree_->set_needs_update_draw_properties(); 1644 active_tree_->set_needs_update_draw_properties();
1645 if (pending_tree_) 1645 if (pending_tree_)
1646 pending_tree_->set_needs_update_draw_properties(); 1646 pending_tree_->set_needs_update_draw_properties();
1647 } 1647 }
1648 } 1648 }
1649 1649
1650 void LayerTreeHostImpl::CreateAndSetTileManager( 1650 void LayerTreeHostImpl::CreateAndSetTileManager(
1651 ResourceProvider* resource_provider, 1651 ResourceProvider* resource_provider,
1652 ContextProvider* context_provider, 1652 ContextProvider* context_provider,
1653 bool using_map_image) { 1653 bool using_map_image) {
1654 // TODO(skaslev): Add a flag for that.
1655 const bool use_ganesh = true;
1654 DCHECK(settings_.impl_side_painting); 1656 DCHECK(settings_.impl_side_painting);
1655 DCHECK(resource_provider); 1657 DCHECK(resource_provider);
1656 tile_manager_ = 1658 tile_manager_ =
1657 TileManager::Create(this, 1659 TileManager::Create(this,
1658 resource_provider, 1660 resource_provider,
1661 context_provider,
1659 settings_.num_raster_threads, 1662 settings_.num_raster_threads,
1660 rendering_stats_instrumentation_, 1663 rendering_stats_instrumentation_,
1661 using_map_image, 1664 using_map_image,
1665 use_ganesh,
1662 GetMaxTransferBufferUsageBytes(context_provider), 1666 GetMaxTransferBufferUsageBytes(context_provider),
1663 GetMaxRasterTasksUsageBytes(context_provider)); 1667 GetMaxRasterTasksUsageBytes(context_provider));
1664 1668
1665 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); 1669 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy());
1666 need_to_update_visible_tiles_before_draw_ = false; 1670 need_to_update_visible_tiles_before_draw_ = false;
1667 } 1671 }
1668 1672
1669 void LayerTreeHostImpl::EnforceZeroBudget(bool zero_budget) { 1673 void LayerTreeHostImpl::EnforceZeroBudget(bool zero_budget) {
1670 SetManagedMemoryPolicy(cached_managed_memory_policy_, zero_budget); 1674 SetManagedMemoryPolicy(cached_managed_memory_policy_, zero_budget);
1671 } 1675 }
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 if (evicted_ui_resources_.empty()) 2846 if (evicted_ui_resources_.empty())
2843 client_->OnCanDrawStateChanged(CanDraw()); 2847 client_->OnCanDrawStateChanged(CanDraw());
2844 } 2848 }
2845 2849
2846 void LayerTreeHostImpl::ScheduleMicroBenchmark( 2850 void LayerTreeHostImpl::ScheduleMicroBenchmark(
2847 scoped_ptr<MicroBenchmarkImpl> benchmark) { 2851 scoped_ptr<MicroBenchmarkImpl> benchmark) {
2848 micro_benchmark_controller_.ScheduleRun(benchmark.Pass()); 2852 micro_benchmark_controller_.ScheduleRun(benchmark.Pass());
2849 } 2853 }
2850 2854
2851 } // namespace cc 2855 } // namespace cc
OLDNEW
« cc/resources/ganesh_rasterizer.cc ('K') | « cc/resources/tile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698