Index: cc/layers/picture_layer.cc |
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc |
index ae823a6cec4f0cc8d251e86845c385559cd25777..88ed4fba58d1e11cbd27180ec68297c6371622c4 100644 |
--- a/cc/layers/picture_layer.cc |
+++ b/cc/layers/picture_layer.cc |
@@ -21,7 +21,9 @@ PictureLayer::PictureLayer(ContentLayerClient* client) |
pile_(make_scoped_refptr(new PicturePile())), |
instrumentation_object_tracker_(id()), |
is_mask_(false), |
- update_source_frame_number_(-1) {} |
+ update_source_frame_number_(-1), |
+ can_use_lcd_text_last_frame_(can_use_lcd_text()) { |
+} |
PictureLayer::~PictureLayer() { |
} |
@@ -88,6 +90,8 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue, |
update_source_frame_number_ = layer_tree_host()->source_frame_number(); |
bool updated = Layer::Update(queue, occlusion); |
+ UpdateCanUseLCDText(); |
+ |
gfx::Rect visible_layer_rect = gfx::ScaleToEnclosingRect( |
visible_content_rect(), 1.f / contents_scale_x()); |
@@ -157,6 +161,15 @@ bool PictureLayer::SupportsLCDText() const { |
return true; |
} |
+void PictureLayer::UpdateCanUseLCDText() { |
+ if (can_use_lcd_text_last_frame_ == can_use_lcd_text()) |
+ return; |
+ |
+ can_use_lcd_text_last_frame_ = can_use_lcd_text(); |
+ if (client_) |
+ client_->DidChangeLayerCanUseLCDText(); |
+} |
+ |
skia::RefPtr<SkPicture> PictureLayer::GetPicture() const { |
// We could either flatten the PicturePile into a single SkPicture, |
// or paint a fresh one depending on what we intend to do with the |