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 9059ae1c0021097639768269fc38115190b63101..064e91e30c4a985311aaa1aa8e7354ad0196bf13 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" |
#include "cc/trees/layer_tree_host.h" |
#include "cc/trees/layer_tree_impl.h" |
#include "ui/gfx/geometry/rect_conversions.h" |
@@ -31,20 +30,6 @@ ScrollAndScaleSet::ScrollAndScaleSet() |
ScrollAndScaleSet::~ScrollAndScaleSet() {} |
-static void SortLayers(LayerList::iterator first, |
- 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) { |
// Layer's scroll offset can have an integer part and fractional part. |
@@ -1281,7 +1266,6 @@ static void PreCalculateMetaInformation( |
template <typename LayerType> |
struct SubtreeGlobals { |
- LayerSorter* layer_sorter; |
int max_texture_size; |
float device_scale_factor; |
float page_scale_factor; |
@@ -2371,17 +2355,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); |
@@ -2419,7 +2392,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; |
@@ -2583,9 +2555,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; |