Chromium Code Reviews| Index: cc/trees/layer_tree_host_common.cc |
| diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc |
| index 3e70aeb38d24ba19239123b16c3b32a16d3cacfd..120c0a989ecd9d07bb2f65491fc6f71fe4e55c36 100644 |
| --- a/cc/trees/layer_tree_host_common.cc |
| +++ b/cc/trees/layer_tree_host_common.cc |
| @@ -15,7 +15,6 @@ |
| #include "cc/layers/render_surface.h" |
| #include "cc/layers/render_surface_impl.h" |
| #include "cc/trees/draw_property_utils.h" |
| -#include "cc/trees/layer_sorter.h" |
|
enne (OOO)
2015/02/04 21:24:00
Can layer sorter get deleted too?
awoloszyn
2015/02/12 16:48:52
Done.
|
| #include "cc/trees/layer_tree_host.h" |
| #include "cc/trees/layer_tree_impl.h" |
| #include "ui/gfx/geometry/rect_conversions.h" |
| @@ -30,20 +29,6 @@ ScrollAndScaleSet::ScrollAndScaleSet() |
| ScrollAndScaleSet::~ScrollAndScaleSet() {} |
| -static void SortLayers(LayerList::iterator forst, |
| - LayerList::iterator end, |
| - void* layer_sorter) { |
| - NOTREACHED(); |
| -} |
| - |
| -static void SortLayers(LayerImplList::iterator first, |
| - LayerImplList::iterator end, |
| - LayerSorter* layer_sorter) { |
| - DCHECK(layer_sorter); |
| - TRACE_EVENT0("cc", "LayerTreeHostCommon::SortLayers"); |
| - layer_sorter->Sort(first, end); |
| -} |
| - |
| template <typename LayerType> |
| static gfx::Vector2dF GetEffectiveScrollDelta(LayerType* layer) { |
| gfx::Vector2dF scroll_delta = layer->ScrollDelta(); |
| @@ -1269,7 +1254,6 @@ static void RoundTranslationComponents(gfx::Transform* transform) { |
| template <typename LayerType> |
| struct SubtreeGlobals { |
| - LayerSorter* layer_sorter; |
| int max_texture_size; |
| float device_scale_factor; |
| float page_scale_factor; |
| @@ -2358,17 +2342,6 @@ static void CalculateDrawPropertiesInternal( |
| return; |
| } |
| - // If preserves-3d then sort all the descendants in 3D so that they can be |
| - // drawn from back to front. If the preserves-3d property is also set on the |
| - // parent then skip the sorting as the parent will sort all the descendants |
| - // anyway. |
| - if (globals.layer_sorter && descendants.size() && layer->Is3dSorted() && |
| - !LayerIsInExisting3DRenderingContext(layer)) { |
| - SortLayers(descendants.begin() + sorting_start_index, |
| - descendants.end(), |
| - globals.layer_sorter); |
| - } |
| - |
| UpdateAccumulatedSurfaceState<LayerType>( |
| layer, local_drawable_content_rect_of_subtree, accumulated_surface_state); |
| @@ -2406,7 +2379,6 @@ static void ProcessCalcDrawPropsInputs( |
| scaled_device_transform.Scale(inputs.device_scale_factor, |
| inputs.device_scale_factor); |
| - globals->layer_sorter = NULL; |
| globals->max_texture_size = inputs.max_texture_size; |
| globals->device_scale_factor = |
| inputs.device_scale_factor * device_transform_scale; |
| @@ -2554,9 +2526,6 @@ void LayerTreeHostCommon::CalculateDrawProperties( |
| DataForRecursion<LayerImpl> data_for_recursion; |
| ProcessCalcDrawPropsInputs(*inputs, &globals, &data_for_recursion); |
| - LayerSorter layer_sorter; |
| - globals.layer_sorter = &layer_sorter; |
| - |
| PreCalculateMetaInformationRecursiveData recursive_data; |
| PreCalculateMetaInformation(inputs->root_layer, &recursive_data); |
| std::vector<AccumulatedSurfaceState<LayerImpl>> accumulated_surface_state; |