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

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

Issue 12676029: cc: Fix capitalization style in chromified files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_unittest_occlusion.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_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 703
704 DCHECK(to_remove != render_passes.end()); 704 DCHECK(to_remove != render_passes.end());
705 705
706 scoped_ptr<RenderPass> removed_pass = render_passes.take(to_remove); 706 scoped_ptr<RenderPass> removed_pass = render_passes.take(to_remove);
707 frame->render_passes.erase(to_remove); 707 frame->render_passes.erase(to_remove);
708 frame->render_passes_by_id.erase(remove_render_pass_id); 708 frame->render_passes_by_id.erase(remove_render_pass_id);
709 709
710 // Now follow up for all RenderPass quads and remove their RenderPasses 710 // Now follow up for all RenderPass quads and remove their RenderPasses
711 // recursively. 711 // recursively.
712 const QuadList& quad_list = removed_pass->quad_list; 712 const QuadList& quad_list = removed_pass->quad_list;
713 QuadList::constBackToFrontIterator quad_list_iterator = 713 QuadList::ConstBackToFrontIterator quad_list_iterator =
714 quad_list.backToFrontBegin(); 714 quad_list.BackToFrontBegin();
715 for (; quad_list_iterator != quad_list.backToFrontEnd(); 715 for (; quad_list_iterator != quad_list.BackToFrontEnd();
716 ++quad_list_iterator) { 716 ++quad_list_iterator) {
717 DrawQuad* current_quad = (*quad_list_iterator); 717 DrawQuad* current_quad = (*quad_list_iterator);
718 if (current_quad->material != DrawQuad::RENDER_PASS) 718 if (current_quad->material != DrawQuad::RENDER_PASS)
719 continue; 719 continue;
720 720
721 RenderPass::Id next_remove_render_pass_id = 721 RenderPass::Id next_remove_render_pass_id =
722 RenderPassDrawQuad::MaterialCast(current_quad)->render_pass_id; 722 RenderPassDrawQuad::MaterialCast(current_quad)->render_pass_id;
723 RemoveRenderPassesRecursive(next_remove_render_pass_id, frame); 723 RemoveRenderPassesRecursive(next_remove_render_pass_id, frame);
724 } 724 }
725 } 725 }
(...skipping 17 matching lines...) Expand all
743 743
744 bool LayerTreeHostImpl::CullRenderPassesWithNoQuads::ShouldRemoveRenderPass( 744 bool LayerTreeHostImpl::CullRenderPassesWithNoQuads::ShouldRemoveRenderPass(
745 const RenderPassDrawQuad& quad, const FrameData& frame) const { 745 const RenderPassDrawQuad& quad, const FrameData& frame) const {
746 const RenderPass* render_pass = 746 const RenderPass* render_pass =
747 FindRenderPassById(quad.render_pass_id, frame); 747 FindRenderPassById(quad.render_pass_id, frame);
748 if (!render_pass) 748 if (!render_pass)
749 return false; 749 return false;
750 750
751 // If any quad or RenderPass draws into this RenderPass, then keep it. 751 // If any quad or RenderPass draws into this RenderPass, then keep it.
752 const QuadList& quad_list = render_pass->quad_list; 752 const QuadList& quad_list = render_pass->quad_list;
753 for (QuadList::constBackToFrontIterator quad_list_iterator = 753 for (QuadList::ConstBackToFrontIterator quad_list_iterator =
754 quad_list.backToFrontBegin(); 754 quad_list.BackToFrontBegin();
755 quad_list_iterator != quad_list.backToFrontEnd(); 755 quad_list_iterator != quad_list.BackToFrontEnd();
756 ++quad_list_iterator) { 756 ++quad_list_iterator) {
757 DrawQuad* current_quad = *quad_list_iterator; 757 DrawQuad* current_quad = *quad_list_iterator;
758 758
759 if (current_quad->material != DrawQuad::RENDER_PASS) 759 if (current_quad->material != DrawQuad::RENDER_PASS)
760 return false; 760 return false;
761 761
762 const RenderPass* contributing_pass = FindRenderPassById( 762 const RenderPass* contributing_pass = FindRenderPassById(
763 RenderPassDrawQuad::MaterialCast(current_quad)->render_pass_id, frame); 763 RenderPassDrawQuad::MaterialCast(current_quad)->render_pass_id, frame);
764 if (contributing_pass) 764 if (contributing_pass)
765 return false; 765 return false;
(...skipping 11 matching lines...) Expand all
777 777
778 // static 778 // static
779 template <typename RenderPassCuller> 779 template <typename RenderPassCuller>
780 void LayerTreeHostImpl::RemoveRenderPasses(RenderPassCuller culler, 780 void LayerTreeHostImpl::RemoveRenderPasses(RenderPassCuller culler,
781 FrameData* frame) { 781 FrameData* frame) {
782 for (size_t it = culler.RenderPassListBegin(frame->render_passes); 782 for (size_t it = culler.RenderPassListBegin(frame->render_passes);
783 it != culler.RenderPassListEnd(frame->render_passes); 783 it != culler.RenderPassListEnd(frame->render_passes);
784 it = culler.RenderPassListNext(it)) { 784 it = culler.RenderPassListNext(it)) {
785 const RenderPass* current_pass = frame->render_passes[it]; 785 const RenderPass* current_pass = frame->render_passes[it];
786 const QuadList& quad_list = current_pass->quad_list; 786 const QuadList& quad_list = current_pass->quad_list;
787 QuadList::constBackToFrontIterator quad_list_iterator = 787 QuadList::ConstBackToFrontIterator quad_list_iterator =
788 quad_list.backToFrontBegin(); 788 quad_list.BackToFrontBegin();
789 789
790 for (; quad_list_iterator != quad_list.backToFrontEnd(); 790 for (; quad_list_iterator != quad_list.BackToFrontEnd();
791 ++quad_list_iterator) { 791 ++quad_list_iterator) {
792 DrawQuad* current_quad = *quad_list_iterator; 792 DrawQuad* current_quad = *quad_list_iterator;
793 793
794 if (current_quad->material != DrawQuad::RENDER_PASS) 794 if (current_quad->material != DrawQuad::RENDER_PASS)
795 continue; 795 continue;
796 796
797 const RenderPassDrawQuad* render_pass_quad = 797 const RenderPassDrawQuad* render_pass_quad =
798 RenderPassDrawQuad::MaterialCast(current_quad); 798 RenderPassDrawQuad::MaterialCast(current_quad);
799 if (!culler.ShouldRemoveRenderPass(*render_pass_quad, *frame)) 799 if (!culler.ShouldRemoveRenderPass(*render_pass_quad, *frame))
800 continue; 800 continue;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 gfx::SizeF dip_size = 1034 gfx::SizeF dip_size =
1035 gfx::ScaleSize(DeviceViewportSize(), 1.f / device_scale_factor()); 1035 gfx::ScaleSize(DeviceViewportSize(), 1.f / device_scale_factor());
1036 1036
1037 // The clip layer should be used if non-overlay scrollbars may exist since 1037 // The clip layer should be used if non-overlay scrollbars may exist since
1038 // it adjusts for them. 1038 // it adjusts for them.
1039 LayerImpl* clip_layer = active_tree_->RootClipLayer(); 1039 LayerImpl* clip_layer = active_tree_->RootClipLayer();
1040 if (!Settings().solid_color_scrollbars && clip_layer && 1040 if (!Settings().solid_color_scrollbars && clip_layer &&
1041 clip_layer->masks_to_bounds()) 1041 clip_layer->masks_to_bounds())
1042 dip_size = clip_layer->bounds(); 1042 dip_size = clip_layer->bounds();
1043 1043
1044 float topOffset = 1044 float top_offset =
1045 top_controls_manager_ ? top_controls_manager_->content_top_offset() : 0.f; 1045 top_controls_manager_ ? top_controls_manager_->content_top_offset() : 0.f;
1046 return gfx::SizeF(dip_size.width(), 1046 return gfx::SizeF(dip_size.width(),
1047 dip_size.height() - topOffset - overdraw_bottom_height_); 1047 dip_size.height() - top_offset - overdraw_bottom_height_);
1048 } 1048 }
1049 1049
1050 const LayerTreeSettings& LayerTreeHostImpl::Settings() const { 1050 const LayerTreeSettings& LayerTreeHostImpl::Settings() const {
1051 return settings(); 1051 return settings();
1052 } 1052 }
1053 1053
1054 void LayerTreeHostImpl::DidLoseOutputSurface() { 1054 void LayerTreeHostImpl::DidLoseOutputSurface() {
1055 client_->DidLoseOutputSurfaceOnImplThread(); 1055 client_->DidLoseOutputSurfaceOnImplThread();
1056 } 1056 }
1057 1057
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 client_->SetNeedsRedrawOnImplThread(); 1352 client_->SetNeedsRedrawOnImplThread();
1353 } 1353 }
1354 1354
1355 bool LayerTreeHostImpl::EnsureRenderSurfaceLayerList() { 1355 bool LayerTreeHostImpl::EnsureRenderSurfaceLayerList() {
1356 active_tree_->UpdateDrawProperties(LayerTreeImpl::UPDATE_ACTIVE_TREE); 1356 active_tree_->UpdateDrawProperties(LayerTreeImpl::UPDATE_ACTIVE_TREE);
1357 return active_tree_->RenderSurfaceLayerList().size(); 1357 return active_tree_->RenderSurfaceLayerList().size();
1358 } 1358 }
1359 1359
1360 InputHandlerClient::ScrollStatus LayerTreeHostImpl::ScrollBegin( 1360 InputHandlerClient::ScrollStatus LayerTreeHostImpl::ScrollBegin(
1361 gfx::Point viewport_point, InputHandlerClient::ScrollInputType type) { 1361 gfx::Point viewport_point, InputHandlerClient::ScrollInputType type) {
1362 TRACE_EVENT0("cc", "LayerTreeHostImpl::scrollBegin"); 1362 TRACE_EVENT0("cc", "LayerTreeHostImpl::ScrollBegin");
1363 1363
1364 if (top_controls_manager_) 1364 if (top_controls_manager_)
1365 top_controls_manager_->ScrollBegin(); 1365 top_controls_manager_->ScrollBegin();
1366 1366
1367 DCHECK(!CurrentlyScrollingLayer()); 1367 DCHECK(!CurrentlyScrollingLayer());
1368 ClearCurrentlyScrollingLayer(); 1368 ClearCurrentlyScrollingLayer();
1369 1369
1370 if (!EnsureRenderSurfaceLayerList()) 1370 if (!EnsureRenderSurfaceLayerList())
1371 return ScrollIgnored; 1371 return ScrollIgnored;
1372 1372
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 debug_state_ = debug_state; 2022 debug_state_ = debug_state;
2023 } 2023 }
2024 2024
2025 void LayerTreeHostImpl::SavePaintTime(const base::TimeDelta& total_paint_time, 2025 void LayerTreeHostImpl::SavePaintTime(const base::TimeDelta& total_paint_time,
2026 int commit_number) { 2026 int commit_number) {
2027 DCHECK(debug_state_.continuous_painting); 2027 DCHECK(debug_state_.continuous_painting);
2028 paint_time_counter_->SavePaintTime(total_paint_time, commit_number); 2028 paint_time_counter_->SavePaintTime(total_paint_time, commit_number);
2029 } 2029 }
2030 2030
2031 } // namespace cc 2031 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_unittest_occlusion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698