Index: cc/layers/picture_layer.cc |
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc |
index a6b68cc12d5f2e7801aec8fd882b6aa3392894a8..eb301bf5bd37e47399f61b4bcea8e6f79ca73bf0 100644 |
--- a/cc/layers/picture_layer.cc |
+++ b/cc/layers/picture_layer.cc |
@@ -22,7 +22,7 @@ PictureLayer::PictureLayer(ContentLayerClient* client) |
recording_source_(new PicturePile), |
instrumentation_object_tracker_(id()), |
update_source_frame_number_(-1), |
- can_use_lcd_text_last_frame_(can_use_lcd_text()) { |
+ can_use_lcd_text_for_update_(true) { |
} |
PictureLayer::~PictureLayer() { |
@@ -126,10 +126,12 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue, |
// to the impl side so that it drops tiles that may not have a recording |
// for them. |
DCHECK(client_); |
+ bool can_use_lcd_text = |
+ can_use_lcd_text_for_update_ == LCD_TEXT_STATE_ALLOWED; |
enne (OOO)
2014/11/12 21:47:30
Er, isn't can_use_lcd_text_for_update_ now a bool?
danakj
2014/11/12 21:47:52
Er, how did this compile?
|
updated |= recording_source_->UpdateAndExpandInvalidation( |
client_, &recording_invalidation_, SafeOpaqueBackgroundColor(), |
- contents_opaque(), client_->FillsBoundsCompletely(), layer_size, |
- visible_layer_rect, update_source_frame_number_, |
+ contents_opaque(), client_->FillsBoundsCompletely(), can_use_lcd_text, |
+ layer_size, visible_layer_rect, update_source_frame_number_, |
Picture::RECORD_NORMALLY); |
last_updated_visible_content_rect_ = visible_content_rect(); |
@@ -153,12 +155,13 @@ bool PictureLayer::SupportsLCDText() const { |
} |
void PictureLayer::UpdateCanUseLCDText() { |
- if (can_use_lcd_text_last_frame_ == can_use_lcd_text()) |
+ if (!can_use_lcd_text_for_update_) |
+ return; // Don't allow the LcdTextState to change once disabled. |
+ if (can_use_lcd_text_for_update_ == can_use_lcd_text()) |
return; |
- can_use_lcd_text_last_frame_ = can_use_lcd_text(); |
- if (client_) |
- client_->DidChangeLayerCanUseLCDText(); |
+ can_use_lcd_text_for_update_ = can_use_lcd_text(); |
+ client_->DidChangeLayerCanUseLcdText(); |
} |
skia::RefPtr<SkPicture> PictureLayer::GetPicture() const { |