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

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

Issue 1088773003: Reuse property trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no more first tick nonsense. Created 5 years, 8 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 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_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2549 const bool draw_transforms_match = 2549 const bool draw_transforms_match =
2550 ApproximatelyEqual(current_layer->draw_transform(), 2550 ApproximatelyEqual(current_layer->draw_transform(),
2551 current_layer->draw_transform_from_property_trees( 2551 current_layer->draw_transform_from_property_trees(
2552 inputs->property_trees->transform_tree)); 2552 inputs->property_trees->transform_tree));
2553 CHECK(draw_transforms_match); 2553 CHECK(draw_transforms_match);
2554 2554
2555 const bool draw_opacities_match = 2555 const bool draw_opacities_match =
2556 current_layer->draw_opacity() == 2556 current_layer->draw_opacity() ==
2557 current_layer->DrawOpacityFromPropertyTrees( 2557 current_layer->DrawOpacityFromPropertyTrees(
2558 inputs->property_trees->opacity_tree); 2558 inputs->property_trees->opacity_tree);
2559 CHECK(draw_opacities_match); 2559 CHECK(draw_opacities_match)
enne (OOO) 2015/04/16 21:49:33 This seems like it should get done in a separate p
Ian Vollick 2015/04/17 14:56:22 Done.
2560 << "expected: " << current_layer->draw_opacity() << " actual: "
2561 << current_layer->DrawOpacityFromPropertyTrees(
2562 inputs->property_trees->opacity_tree);
2560 } 2563 }
2561 } 2564 }
2562 2565
2563 // The dummy layer list should not have been used. 2566 // The dummy layer list should not have been used.
2564 DCHECK_EQ(0u, dummy_layer_list.size()); 2567 DCHECK_EQ(0u, dummy_layer_list.size());
2565 // A root layer render_surface should always exist after 2568 // A root layer render_surface should always exist after
2566 // CalculateDrawProperties. 2569 // CalculateDrawProperties.
2567 DCHECK(inputs->root_layer->render_surface()); 2570 DCHECK(inputs->root_layer->render_surface());
2568 } 2571 }
2569 2572
(...skipping 17 matching lines...) Expand all
2587 inputs->current_render_surface_layer_list_id); 2590 inputs->current_render_surface_layer_list_id);
2588 2591
2589 // The dummy layer list should not have been used. 2592 // The dummy layer list should not have been used.
2590 DCHECK_EQ(0u, dummy_layer_list.size()); 2593 DCHECK_EQ(0u, dummy_layer_list.size());
2591 // A root layer render_surface should always exist after 2594 // A root layer render_surface should always exist after
2592 // CalculateDrawProperties. 2595 // CalculateDrawProperties.
2593 DCHECK(inputs->root_layer->render_surface()); 2596 DCHECK(inputs->root_layer->render_surface());
2594 } 2597 }
2595 2598
2596 } // namespace cc 2599 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698