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

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: Rebase 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 const gfx::RectF& visible_layer_rect, 281 const gfx::RectF& visible_layer_rect,
282 gfx::Size last_layer_bounds, 282 gfx::Size last_layer_bounds,
283 gfx::Size current_layer_bounds, 283 gfx::Size current_layer_bounds,
284 float last_layer_contents_scale, 284 float last_layer_contents_scale,
285 float current_layer_contents_scale, 285 float current_layer_contents_scale,
286 const gfx::Transform& last_screen_transform, 286 const gfx::Transform& last_screen_transform,
287 const gfx::Transform& current_screen_transform, 287 const gfx::Transform& current_screen_transform,
288 double current_frame_time_in_seconds, 288 double current_frame_time_in_seconds,
289 bool store_screen_space_quads_on_tiles, 289 bool store_screen_space_quads_on_tiles,
290 size_t max_tiles_for_interest_area) { 290 size_t max_tiles_for_interest_area) {
291 if (ContentRect().IsEmpty()) 291 if (!NeedsUpdateForFrameAtTime(current_frame_time_in_seconds)) {
292 // This should never be zero for the purposes of has_ever_been_updated().
293 DCHECK_NE(current_frame_time_in_seconds, 0.0);
292 return; 294 return;
293 if (!NeedsUpdateForFrameAtTime(current_frame_time_in_seconds)) 295 }
296 if (ContentRect().IsEmpty()) {
297 last_impl_frame_time_in_seconds_ = current_frame_time_in_seconds;
294 return; 298 return;
299 }
295 300
296 gfx::Rect viewport_in_content_space = 301 gfx::Rect viewport_in_content_space =
297 gfx::ToEnclosingRect(gfx::ScaleRect(viewport_in_layer_space, 302 gfx::ToEnclosingRect(gfx::ScaleRect(viewport_in_layer_space,
298 contents_scale_)); 303 contents_scale_));
299 gfx::Rect visible_content_rect = 304 gfx::Rect visible_content_rect =
300 gfx::ToEnclosingRect(gfx::ScaleRect(visible_layer_rect, 305 gfx::ToEnclosingRect(gfx::ScaleRect(visible_layer_rect,
301 contents_scale_)); 306 contents_scale_));
302 307
303 gfx::Size tile_size = tiling_data_.max_texture_size(); 308 gfx::Size tile_size = tiling_data_.max_texture_size();
304 int64 interest_rect_area = 309 int64 interest_rect_area =
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 600
596 // If our delta is less then our event distance, we're done. 601 // If our delta is less then our event distance, we're done.
597 if (delta < event.distance) 602 if (delta < event.distance)
598 break; 603 break;
599 } 604 }
600 605
601 return gfx::Rect(origin_x, origin_y, width, height); 606 return gfx::Rect(origin_x, origin_y, width, height);
602 } 607 }
603 608
604 } // namespace cc 609 } // 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