Index: cc/layers/picture_layer.cc |
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc |
index 55241d0a16f4c43125e3cdb09c95a104f23b6f2f..feaaf9c7fe3e7bbbebf54599754c55846b2e6143 100644 |
--- a/cc/layers/picture_layer.cc |
+++ b/cc/layers/picture_layer.cc |
@@ -24,7 +24,8 @@ PictureLayer::PictureLayer(ContentLayerClient* client) |
instrumentation_object_tracker_(id()), |
update_source_frame_number_(-1), |
can_use_lcd_text_for_update_(true), |
- is_mask_(false) { |
+ is_mask_(false), |
+ nearest_neighbor_(false) { |
} |
PictureLayer::PictureLayer(ContentLayerClient* client, |
@@ -68,6 +69,7 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) { |
layer_impl->invalidation_.Clear(); |
layer_impl->invalidation_.Swap(&recording_invalidation_); |
layer_impl->set_is_mask(is_mask_); |
+ layer_impl->SetNearestNeighbor(nearest_neighbor_); |
scoped_refptr<RasterSource> raster_source = |
recording_source_->CreateRasterSource(); |
raster_source->SetBackgoundColor(SafeOpaqueBackgroundColor()); |
@@ -206,6 +208,13 @@ void PictureLayer::ClearClient() { |
UpdateDrawsContent(HasDrawableContent()); |
} |
+void PictureLayer::SetNearestNeighbor(bool nearest_neighbor) { |
+ if (nearest_neighbor_ != nearest_neighbor) { |
danakj
2014/12/09 19:44:45
if == return
jackhou1
2014/12/10 01:04:14
Done.
|
+ nearest_neighbor_ = nearest_neighbor; |
+ SetNeedsDisplay(); |
danakj
2014/12/09 19:44:45
SetNeedsCommit is what you are looking for here
jackhou1
2014/12/10 01:04:14
Done.
|
+ } |
+} |
+ |
bool PictureLayer::HasDrawableContent() const { |
return client_ && Layer::HasDrawableContent(); |
} |