diff options
Diffstat (limited to 'cc/layers/texture_layer.cc')
| -rw-r--r-- | cc/layers/texture_layer.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc index d53cfbe..cf1149b 100644 --- a/cc/layers/texture_layer.cc +++ b/cc/layers/texture_layer.cc @@ -27,6 +27,7 @@ TextureLayer::TextureLayer(TextureLayerClient* client) : Layer(), client_(client), flipped_(true), + nearest_neighbor_(false), uv_top_left_(0.f, 0.f), uv_bottom_right_(1.f, 1.f), premultiplied_alpha_(true), @@ -65,6 +66,13 @@ void TextureLayer::SetFlipped(bool flipped) { SetNeedsCommit(); } +void TextureLayer::SetNearestNeighbor(bool nearest_neighbor) { + if (nearest_neighbor_ == nearest_neighbor) + return; + nearest_neighbor_ = nearest_neighbor; + SetNeedsCommit(); +} + void TextureLayer::SetUV(const gfx::PointF& top_left, const gfx::PointF& bottom_right) { if (uv_top_left_ == top_left && uv_bottom_right_ == bottom_right) @@ -238,6 +246,7 @@ void TextureLayer::PushPropertiesTo(LayerImpl* layer) { TextureLayerImpl* texture_layer = static_cast<TextureLayerImpl*>(layer); texture_layer->SetFlipped(flipped_); + texture_layer->SetNearestNeighbor(nearest_neighbor_); texture_layer->SetUVTopLeft(uv_top_left_); texture_layer->SetUVBottomRight(uv_bottom_right_); texture_layer->SetVertexOpacity(vertex_opacity_); |
