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

Side by Side Diff: cc/layers/tiled_layer.cc

Issue 13265003: cc: Switch ContentLayerUpdater to use RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@update
Patch Set: Added printfs Created 7 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
« no previous file with comments | « cc/layers/scrollbar_layer.cc ('k') | cc/resources/bitmap_content_layer_updater.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/layers/tiled_layer.h" 5 #include "cc/layers/tiled_layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 base::AutoReset<bool> ignore_set_needs_commit(&ignore_set_needs_commit_, 726 base::AutoReset<bool> ignore_set_needs_commit(&ignore_set_needs_commit_,
727 true); 727 true);
728 728
729 ContentsScalingLayer::Update(queue, occlusion, stats); 729 ContentsScalingLayer::Update(queue, occlusion, stats);
730 UpdateBounds(); 730 UpdateBounds();
731 } 731 }
732 732
733 if (tiler_->has_empty_bounds() || !DrawsContent()) 733 if (tiler_->has_empty_bounds() || !DrawsContent())
734 return; 734 return;
735 735
736 printf("TiledLayer::Update\n");
737
736 bool did_paint = false; 738 bool did_paint = false;
737 739
738 // Animation pre-paint. If the layer is small, try to paint it all 740 // Animation pre-paint. If the layer is small, try to paint it all
739 // immediately whether or not it is occluded, to avoid paint/upload 741 // immediately whether or not it is occluded, to avoid paint/upload
740 // hiccups while it is animating. 742 // hiccups while it is animating.
741 if (IsSmallAnimatedLayer()) { 743 if (IsSmallAnimatedLayer()) {
742 int left, top, right, bottom; 744 int left, top, right, bottom;
743 tiler_->ContentRectToTileIndices(gfx::Rect(content_bounds()), 745 tiler_->ContentRectToTileIndices(gfx::Rect(content_bounds()),
744 &left, 746 &left,
745 &top, 747 &top,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 gfx::Rect prepaint_rect = visible_content_rect(); 884 gfx::Rect prepaint_rect = visible_content_rect();
883 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, 885 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns,
884 -tiler_->tile_size().height() * kPrepaintRows); 886 -tiler_->tile_size().height() * kPrepaintRows);
885 gfx::Rect content_rect(content_bounds()); 887 gfx::Rect content_rect(content_bounds());
886 prepaint_rect.Intersect(content_rect); 888 prepaint_rect.Intersect(content_rect);
887 889
888 return prepaint_rect; 890 return prepaint_rect;
889 } 891 }
890 892
891 } // namespace cc 893 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/scrollbar_layer.cc ('k') | cc/resources/bitmap_content_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698