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

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

Issue 2026033002: cc: Remove can_use_lcd_text from draw properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/picture_layer_impl_unittest.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 "cc/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 594
595 void PictureLayerImpl::UpdateCanUseLCDTextAfterCommit() { 595 void PictureLayerImpl::UpdateCanUseLCDTextAfterCommit() {
596 // This function is only allowed to be called after commit, due to it not 596 // This function is only allowed to be called after commit, due to it not
597 // being smart about sharing tiles and because otherwise it would cause 597 // being smart about sharing tiles and because otherwise it would cause
598 // flashes by switching out tiles in place that may be currently on screen. 598 // flashes by switching out tiles in place that may be currently on screen.
599 DCHECK(layer_tree_impl()->IsSyncTree()); 599 DCHECK(layer_tree_impl()->IsSyncTree());
600 600
601 // Don't allow the LCD text state to change once disabled. 601 // Don't allow the LCD text state to change once disabled.
602 if (!RasterSourceUsesLCDText()) 602 if (!RasterSourceUsesLCDText())
603 return; 603 return;
604 if (can_use_lcd_text() == RasterSourceUsesLCDText()) 604 if (CanUseLCDText() == RasterSourceUsesLCDText())
605 return; 605 return;
606 606
607 // Raster sources are considered const, so in order to update the state 607 // Raster sources are considered const, so in order to update the state
608 // a new one must be created and all tiles recreated. 608 // a new one must be created and all tiles recreated.
609 scoped_refptr<RasterSource> new_raster_source = 609 scoped_refptr<RasterSource> new_raster_source =
610 raster_source_->CreateCloneWithoutLCDText(); 610 raster_source_->CreateCloneWithoutLCDText();
611 raster_source_.swap(new_raster_source); 611 raster_source_.swap(new_raster_source);
612 612
613 // Synthetically invalidate everything. 613 // Synthetically invalidate everything.
614 gfx::Rect bounds_rect(bounds()); 614 gfx::Rect bounds_rect(bounds());
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1291 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1292 return !layer_tree_impl()->IsRecycleTree(); 1292 return !layer_tree_impl()->IsRecycleTree();
1293 } 1293 }
1294 1294
1295 bool PictureLayerImpl::HasValidTilePriorities() const { 1295 bool PictureLayerImpl::HasValidTilePriorities() const {
1296 return IsOnActiveOrPendingTree() && 1296 return IsOnActiveOrPendingTree() &&
1297 is_drawn_render_surface_layer_list_member(); 1297 is_drawn_render_surface_layer_list_member();
1298 } 1298 }
1299 1299
1300 } // namespace cc 1300 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698