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

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

Issue 12965007: Fix cpplint errors in cc/(animation|input|layers|trees|test)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/layers/tiled_layer.h ('k') | cc/layers/tiled_layer_impl.h » ('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>
8 #include <vector>
9
7 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 11 #include "base/basictypes.h"
9 #include "build/build_config.h" 12 #include "build/build_config.h"
10 #include "cc/debug/overdraw_metrics.h" 13 #include "cc/debug/overdraw_metrics.h"
11 #include "cc/layers/layer_impl.h" 14 #include "cc/layers/layer_impl.h"
12 #include "cc/layers/tiled_layer_impl.h" 15 #include "cc/layers/tiled_layer_impl.h"
13 #include "cc/resources/layer_updater.h" 16 #include "cc/resources/layer_updater.h"
14 #include "cc/resources/prioritized_resource.h" 17 #include "cc/resources/prioritized_resource.h"
15 #include "cc/resources/priority_calculator.h" 18 #include "cc/resources/priority_calculator.h"
16 #include "cc/trees/layer_tree_host.h" 19 #include "cc/trees/layer_tree_host.h"
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 CHECK_GE(paint_offset.y(), 0); 550 CHECK_GE(paint_offset.y(), 0);
548 CHECK_LE(paint_offset.x() + source_rect.width(), paint_rect.width()); 551 CHECK_LE(paint_offset.x() + source_rect.width(), paint_rect.width());
549 CHECK_LE(paint_offset.y() + source_rect.height(), paint_rect.height()); 552 CHECK_LE(paint_offset.y() + source_rect.height(), paint_rect.height());
550 553
551 tile->updater_resource()->Update( 554 tile->updater_resource()->Update(
552 queue, source_rect, dest_offset, tile->partial_update, stats); 555 queue, source_rect, dest_offset, tile->partial_update, stats);
553 if (occlusion) { 556 if (occlusion) {
554 occlusion->overdraw_metrics()-> 557 occlusion->overdraw_metrics()->
555 DidUpload(gfx::Transform(), source_rect, tile->opaque_rect()); 558 DidUpload(gfx::Transform(), source_rect, tile->opaque_rect());
556 } 559 }
557
558 } 560 }
559 } 561 }
560 } 562 }
561 563
562 // This picks a small animated layer to be anything less than one viewport. This 564 // This picks a small animated layer to be anything less than one viewport. This
563 // is specifically for page transitions which are viewport-sized layers. The 565 // is specifically for page transitions which are viewport-sized layers. The
564 // extra tile of padding is due to these layers being slightly larger than the 566 // extra tile of padding is due to these layers being slightly larger than the
565 // viewport in some cases. 567 // viewport in some cases.
566 bool TiledLayer::IsSmallAnimatedLayer() const { 568 bool TiledLayer::IsSmallAnimatedLayer() const {
567 if (!draw_transform_is_animating() && !screen_space_transform_is_animating()) 569 if (!draw_transform_is_animating() && !screen_space_transform_is_animating())
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 gfx::Rect prepaint_rect = visible_content_rect(); 882 gfx::Rect prepaint_rect = visible_content_rect();
881 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, 883 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns,
882 -tiler_->tile_size().height() * kPrepaintRows); 884 -tiler_->tile_size().height() * kPrepaintRows);
883 gfx::Rect content_rect(content_bounds()); 885 gfx::Rect content_rect(content_bounds());
884 prepaint_rect.Intersect(content_rect); 886 prepaint_rect.Intersect(content_rect);
885 887
886 return prepaint_rect; 888 return prepaint_rect;
887 } 889 }
888 890
889 } // namespace cc 891 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer.h ('k') | cc/layers/tiled_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698