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

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

Issue 935143002: cc: Remove UpdateDrawProperties during sync composite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lcd_text_compositor_side_only
Patch Set: grammar fix Created 5 years, 10 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
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 10
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 void LayerTreeImpl::ClearViewportLayers() { 531 void LayerTreeImpl::ClearViewportLayers() {
532 page_scale_layer_ = NULL; 532 page_scale_layer_ = NULL;
533 inner_viewport_scroll_layer_ = NULL; 533 inner_viewport_scroll_layer_ = NULL;
534 outer_viewport_scroll_layer_ = NULL; 534 outer_viewport_scroll_layer_ = NULL;
535 } 535 }
536 536
537 bool LayerTreeImpl::UpdateDrawProperties(bool update_lcd_text) { 537 bool LayerTreeImpl::UpdateDrawProperties(bool update_lcd_text) {
538 if (!needs_update_draw_properties_) 538 if (!needs_update_draw_properties_)
539 return true; 539 return true;
540 540
541 // For max_texture_size. 541 // Calling UpdateDrawProperties must clear this flag, so there can be no
542 // early outs before this.
543 needs_update_draw_properties_ = false;
544
545 // For max_texture_size. When the renderer is re-created in
546 // CreateAndSetRenderer, the needs update draw properties flag is set
547 // agian.
danakj 2015/02/19 19:03:30 again
542 if (!layer_tree_host_impl_->renderer()) 548 if (!layer_tree_host_impl_->renderer())
543 return false; 549 return false;
544 550
551 // Clear this after the renderer early out, as it should still be
552 // possible to hit test even without a renderer.
553 render_surface_layer_list_.clear();
554
545 if (!root_layer()) 555 if (!root_layer())
546 return false; 556 return false;
547 557
548 needs_update_draw_properties_ = false;
549 render_surface_layer_list_.clear();
550
551 { 558 {
552 TRACE_EVENT2( 559 TRACE_EVENT2(
553 "cc", "LayerTreeImpl::UpdateDrawProperties::CalculateDrawProperties", 560 "cc", "LayerTreeImpl::UpdateDrawProperties::CalculateDrawProperties",
554 "IsActive", IsActiveTree(), "SourceFrameNumber", source_frame_number_); 561 "IsActive", IsActiveTree(), "SourceFrameNumber", source_frame_number_);
555 LayerImpl* page_scale_layer = 562 LayerImpl* page_scale_layer =
556 page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer(); 563 page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer();
557 bool can_render_to_separate_surface = 564 bool can_render_to_separate_surface =
558 (layer_tree_host_impl_->GetDrawMode() != 565 (layer_tree_host_impl_->GetDrawMode() !=
559 DRAW_MODE_RESOURCELESS_SOFTWARE); 566 DRAW_MODE_RESOURCELESS_SOFTWARE);
560 567
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 scoped_ptr<PendingPageScaleAnimation> pending_animation) { 1654 scoped_ptr<PendingPageScaleAnimation> pending_animation) {
1648 pending_page_scale_animation_ = pending_animation.Pass(); 1655 pending_page_scale_animation_ = pending_animation.Pass();
1649 } 1656 }
1650 1657
1651 scoped_ptr<PendingPageScaleAnimation> 1658 scoped_ptr<PendingPageScaleAnimation>
1652 LayerTreeImpl::TakePendingPageScaleAnimation() { 1659 LayerTreeImpl::TakePendingPageScaleAnimation() {
1653 return pending_page_scale_animation_.Pass(); 1660 return pending_page_scale_animation_.Pass();
1654 } 1661 }
1655 1662
1656 } // namespace cc 1663 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698