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

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

Issue 14883003: cc: Fix impl-side painting flashing due to missing tiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up 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/resources/picture_layer_tiling.h ('k') | no next file » | 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 "cc/resources/picture_layer_tiling.h" 5 #include "cc/resources/picture_layer_tiling.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 const gfx::RectF& visible_layer_rect, 288 const gfx::RectF& visible_layer_rect,
289 gfx::Size last_layer_bounds, 289 gfx::Size last_layer_bounds,
290 gfx::Size current_layer_bounds, 290 gfx::Size current_layer_bounds,
291 float last_layer_contents_scale, 291 float last_layer_contents_scale,
292 float current_layer_contents_scale, 292 float current_layer_contents_scale,
293 const gfx::Transform& last_screen_transform, 293 const gfx::Transform& last_screen_transform,
294 const gfx::Transform& current_screen_transform, 294 const gfx::Transform& current_screen_transform,
295 double current_frame_time_in_seconds, 295 double current_frame_time_in_seconds,
296 bool store_screen_space_quads_on_tiles, 296 bool store_screen_space_quads_on_tiles,
297 size_t max_tiles_for_interest_area) { 297 size_t max_tiles_for_interest_area) {
298 if (ContentRect().IsEmpty()) 298 if (!NeedsUpdateForFrameAtTime(current_frame_time_in_seconds)) {
299 // This should never be zero for the purposes of has_ever_been_updated().
300 DCHECK_NE(current_frame_time_in_seconds, 0.0);
299 return; 301 return;
300 if (!NeedsUpdateForFrameAtTime(current_frame_time_in_seconds)) 302 }
303 if (ContentRect().IsEmpty()) {
304 last_impl_frame_time_in_seconds_ = current_frame_time_in_seconds;
danakj 2013/05/03 01:11:22 Oh, word.
301 return; 305 return;
306 }
302 307
303 gfx::Rect viewport_in_content_space = 308 gfx::Rect viewport_in_content_space =
304 gfx::ToEnclosingRect(gfx::ScaleRect(viewport_in_layer_space, 309 gfx::ToEnclosingRect(gfx::ScaleRect(viewport_in_layer_space,
305 contents_scale_)); 310 contents_scale_));
306 gfx::Rect visible_content_rect = 311 gfx::Rect visible_content_rect =
307 gfx::ToEnclosingRect(gfx::ScaleRect(visible_layer_rect, 312 gfx::ToEnclosingRect(gfx::ScaleRect(visible_layer_rect,
308 contents_scale_)); 313 contents_scale_));
309 314
310 gfx::Size tile_size = tiling_data_.max_texture_size(); 315 gfx::Size tile_size = tiling_data_.max_texture_size();
311 int64 interest_rect_area = 316 int64 interest_rect_area =
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 607
603 // If our delta is less then our event distance, we're done. 608 // If our delta is less then our event distance, we're done.
604 if (delta < event.distance) 609 if (delta < event.distance)
605 break; 610 break;
606 } 611 }
607 612
608 return gfx::Rect(origin_x, origin_y, width, height); 613 return gfx::Rect(origin_x, origin_y, width, height);
609 } 614 }
610 615
611 } // namespace cc 616 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698