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

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

Issue 517893002: Cleanup resourceless_software_draw() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 10
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 DoPostCommitInitializationIfNeeded(); 428 DoPostCommitInitializationIfNeeded();
429 429
430 // TODO(danakj): We should always get an occlusion tracker when we are using 430 // TODO(danakj): We should always get an occlusion tracker when we are using
431 // occlusion, so update this check when we don't use a pending tree in the 431 // occlusion, so update this check when we don't use a pending tree in the
432 // browser compositor. 432 // browser compositor.
433 DCHECK(!occlusion_tracker || 433 DCHECK(!occlusion_tracker ||
434 layer_tree_impl()->settings().use_occlusion_for_tile_prioritization); 434 layer_tree_impl()->settings().use_occlusion_for_tile_prioritization);
435 435
436 // Transforms and viewport are invalid for tile management inside a 436 // Transforms and viewport are invalid for tile management inside a
437 // resourceless software draw, so don't update them. 437 // resourceless software draw, so don't update them.
438 if (!layer_tree_impl()->resourceless_software_draw()) { 438 visible_rect_for_tile_priority_ = visible_content_rect();
439 visible_rect_for_tile_priority_ = visible_content_rect(); 439 viewport_rect_for_tile_priority_ =
440 viewport_rect_for_tile_priority_ = 440 layer_tree_impl()->ViewportRectForTilePriority();
441 layer_tree_impl()->ViewportRectForTilePriority(); 441 screen_space_transform_for_tile_priority_ = screen_space_transform();
442 screen_space_transform_for_tile_priority_ = screen_space_transform();
443 }
444 442
445 if (!CanHaveTilings()) { 443 if (!CanHaveTilings()) {
446 ideal_page_scale_ = 0.f; 444 ideal_page_scale_ = 0.f;
447 ideal_device_scale_ = 0.f; 445 ideal_device_scale_ = 0.f;
448 ideal_contents_scale_ = 0.f; 446 ideal_contents_scale_ = 0.f;
449 ideal_source_scale_ = 0.f; 447 ideal_source_scale_ = 0.f;
450 SanityCheckTilingState(); 448 SanityCheckTilingState();
451 return; 449 return;
452 } 450 }
453 451
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); 1771 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange();
1774 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; 1772 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start;
1775 return tiling_range.end - 1 - current_tiling_range_offset; 1773 return tiling_range.end - 1 - current_tiling_range_offset;
1776 } 1774 }
1777 } 1775 }
1778 NOTREACHED(); 1776 NOTREACHED();
1779 return 0; 1777 return 0;
1780 } 1778 }
1781 1779
1782 } // namespace cc 1780 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_impl.h » ('j') | content/browser/android/in_process/synchronous_compositor_output_surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698