Commit 1e447ad6 authored by enne's avatar enne Committed by Commit bot

cc: Remove ValidateRenderSurfaces debug check

This function is trying to test when a layer should have a render
surface by partially duplicating / reimplementing logic from
ShouldHaveRenderSurface.  It creates render surfaces, then in the same
stack checks to see if a render surface should have been created, but it
doesn't use the exact same logic.  (This is likely what is causing it
to fail.)

Rather than trying to make it equal, remove this test, as render
surface creation is already well-tested in unit tests.

BUG=457217

Review URL: https://codereview.chromium.org/913793002

Cr-Commit-Position: refs/heads/master@{#315703}
parent 8acaec37
......@@ -1203,30 +1203,12 @@ struct PreCalculateMetaInformationRecursiveData {
}
};
static bool ValidateRenderSurface(LayerImpl* layer) {
// There are a few cases in which it is incorrect to not have a
// render_surface.
if (layer->render_surface())
return true;
return layer->filters().IsEmpty() && layer->background_filters().IsEmpty() &&
!layer->mask_layer() && !layer->replica_layer() &&
!IsRootLayer(layer) && !layer->is_root_for_isolated_group() &&
!layer->HasCopyRequest();
}
static bool ValidateRenderSurface(Layer* layer) {
return true;
}
// Recursively walks the layer tree to compute any information that is needed
// before doing the main recursion.
template <typename LayerType>
static void PreCalculateMetaInformation(
LayerType* layer,
PreCalculateMetaInformationRecursiveData* recursive_data) {
DCHECK(ValidateRenderSurface(layer));
layer->draw_properties().sorted_for_recursion = false;
layer->draw_properties().has_child_with_a_scroll_parent = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment