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

Side by Side Diff: cc/resources/picture_pile_base.cc

Issue 13051003: cpplint.py pass on cc/(base|debug|quads|resources)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix prioritized_resource_unittest 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/resources/picture_pile_base.h ('k') | cc/resources/picture_pile_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/resources/picture_pile_base.h" 5 #include "cc/resources/picture_pile_base.h"
6 6
7 #include <algorithm>
8 #include <vector>
9
7 #include "base/logging.h" 10 #include "base/logging.h"
8 #include "third_party/skia/include/core/SkColor.h" 11 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/gfx/rect_conversions.h" 12 #include "ui/gfx/rect_conversions.h"
10 13
11 namespace { 14 namespace {
12 // Dimensions of the tiles in this picture pile as well as the dimensions of 15 // Dimensions of the tiles in this picture pile as well as the dimensions of
13 // the base picture in each tile. 16 // the base picture in each tile.
14 const int kBasePictureSize = 3000; 17 const int kBasePictureSize = 3000;
15 const int kTileGridBorderPixels = 1; 18 const int kTileGridBorderPixels = 1;
16 } 19 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 bool PicturePileBase::CanRaster(float contents_scale, gfx::Rect content_rect) { 164 bool PicturePileBase::CanRaster(float contents_scale, gfx::Rect content_rect) {
162 if (tiling_.total_size().IsEmpty()) 165 if (tiling_.total_size().IsEmpty())
163 return false; 166 return false;
164 gfx::Rect layer_rect = gfx::ToEnclosingRect( 167 gfx::Rect layer_rect = gfx::ToEnclosingRect(
165 gfx::ScaleRect(content_rect, 1.f / contents_scale)); 168 gfx::ScaleRect(content_rect, 1.f / contents_scale));
166 layer_rect.Intersect(gfx::Rect(tiling_.total_size())); 169 layer_rect.Intersect(gfx::Rect(tiling_.total_size()));
167 return recorded_region_.Contains(layer_rect); 170 return recorded_region_.Contains(layer_rect);
168 } 171 }
169 172
170 } // namespace cc 173 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_base.h ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698