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

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

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Created 3 years, 7 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_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 size_t render_surface_list_size = frame->render_surface_list->size(); 829 size_t render_surface_list_size = frame->render_surface_list->size();
830 for (size_t i = 0; i < render_surface_list_size; ++i) { 830 for (size_t i = 0; i < render_surface_list_size; ++i) {
831 size_t surface_index = render_surface_list_size - 1 - i; 831 size_t surface_index = render_surface_list_size - 1 - i;
832 RenderSurfaceImpl* render_surface = 832 RenderSurfaceImpl* render_surface =
833 (*frame->render_surface_list)[surface_index]; 833 (*frame->render_surface_list)[surface_index];
834 834
835 bool is_root_surface = 835 bool is_root_surface =
836 render_surface->EffectTreeIndex() == EffectTree::kContentsRootNodeId; 836 render_surface->EffectTreeIndex() == EffectTree::kContentsRootNodeId;
837 bool should_draw_into_render_pass = 837 bool should_draw_into_render_pass =
838 is_root_surface || render_surface->contributes_to_drawn_surface() || 838 is_root_surface || render_surface->contributes_to_drawn_surface() ||
839 render_surface->HasCopyRequest(); 839 render_surface->HasCopyRequest() ||
840 render_surface->ForceRenderSurface();
reveman 2017/05/10 13:06:17 is this needed?
wutao 2017/05/11 19:36:35 Removed.
840 if (should_draw_into_render_pass) 841 if (should_draw_into_render_pass)
841 frame->render_passes.push_back(render_surface->CreateRenderPass()); 842 frame->render_passes.push_back(render_surface->CreateRenderPass());
842 } 843 }
843 844
844 // Damage rects for non-root passes aren't meaningful, so set them to be 845 // Damage rects for non-root passes aren't meaningful, so set them to be
845 // equal to the output rect. 846 // equal to the output rect.
846 for (size_t i = 0; i + 1 < frame->render_passes.size(); ++i) { 847 for (size_t i = 0; i + 1 < frame->render_passes.size(); ++i) {
847 RenderPass* pass = frame->render_passes[i].get(); 848 RenderPass* pass = frame->render_passes[i].get();
848 pass->damage_rect = pass->output_rect; 849 pass->damage_rect = pass->output_rect;
849 } 850 }
(...skipping 3448 matching lines...) Expand 10 before | Expand all | Expand 10 after
4298 4299
4299 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { 4300 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) {
4300 if (!element_id) 4301 if (!element_id)
4301 return; 4302 return;
4302 if (ScrollbarAnimationController* animation_controller = 4303 if (ScrollbarAnimationController* animation_controller =
4303 ScrollbarAnimationControllerForElementId(element_id)) 4304 ScrollbarAnimationControllerForElementId(element_id))
4304 animation_controller->DidScrollUpdate(); 4305 animation_controller->DidScrollUpdate();
4305 } 4306 }
4306 4307
4307 } // namespace cc 4308 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698