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

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

Issue 14417014: cc: Add tile-free software compositing mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 199251 Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/resources/tile_manager.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 7
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/base/region.h" 9 #include "cc/base/region.h"
10 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 void PicturePileImpl::Raster( 77 void PicturePileImpl::Raster(
78 SkCanvas* canvas, 78 SkCanvas* canvas,
79 gfx::Rect canvas_rect, 79 gfx::Rect canvas_rect,
80 float contents_scale, 80 float contents_scale,
81 RasterStats* raster_stats) { 81 RasterStats* raster_stats) {
82 82
83 DCHECK(contents_scale >= min_contents_scale_); 83 DCHECK(contents_scale >= min_contents_scale_);
84 84
85 #ifndef NDEBUG
86 // Any non-painted areas will be left in this color.
87 canvas->clear(DebugColors::NonPaintedFillColor());
88 #endif // NDEBUG
89
90 canvas->save(); 85 canvas->save();
91 canvas->translate(-canvas_rect.x(), -canvas_rect.y()); 86 canvas->translate(-canvas_rect.x(), -canvas_rect.y());
92 87
93 gfx::SizeF total_content_size = gfx::ScaleSize(tiling_.total_size(), 88 gfx::SizeF total_content_size = gfx::ScaleSize(tiling_.total_size(),
94 contents_scale); 89 contents_scale);
95 gfx::Rect total_content_rect(gfx::ToCeiledSize(total_content_size)); 90 gfx::Rect total_content_rect(gfx::ToCeiledSize(total_content_size));
96 gfx::Rect content_rect = total_content_rect; 91 gfx::Rect content_rect = total_content_rect;
97 content_rect.Intersect(canvas_rect); 92 content_rect.Intersect(canvas_rect);
98 93
99 // Clear one texel inside the right/bottom edge of the content rect, 94 // Clear one texel inside the right/bottom edge of the content rect,
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 layer_rect_, 323 layer_rect_,
329 *picture_list_iterator_); 324 *picture_list_iterator_);
330 if (pixel_ref_iterator_) 325 if (pixel_ref_iterator_)
331 return; 326 return;
332 } 327 }
333 ++tile_iterator_; 328 ++tile_iterator_;
334 } while (AdvanceToTileWithPictures()); 329 } while (AdvanceToTileWithPictures());
335 } 330 }
336 331
337 } // namespace cc 332 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698