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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 595593002: Splitting of layers for correct intersections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
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 8d25539725914ee4d495f5ac580b86ae70aec0d4..ef468f9e85c418ae9329915ec3232fddc41a8f94 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -14,7 +14,6 @@
#include "cc/layers/layer_iterator.h"
#include "cc/layers/render_surface.h"
#include "cc/layers/render_surface_impl.h"
-#include "cc/trees/layer_sorter.h"
#include "cc/trees/layer_tree_impl.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/transform.h"
@@ -25,20 +24,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();
@@ -1260,7 +1245,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;
@@ -2312,17 +2296,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);
@@ -2360,7 +2333,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;
@@ -2419,9 +2391,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> >

Powered by Google App Engine
This is Rietveld 408576698