| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/texture_layer_impl.h" | 5 #include "cc/layers/texture_layer_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "cc/output/renderer.h" | 10 #include "cc/output/renderer.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 void TextureLayerImpl::SetFlipped(bool flipped) { | 212 void TextureLayerImpl::SetFlipped(bool flipped) { |
| 213 flipped_ = flipped; | 213 flipped_ = flipped; |
| 214 SetNeedsPushProperties(); | 214 SetNeedsPushProperties(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 void TextureLayerImpl::SetNearestNeighbor(bool nearest_neighbor) { | 217 void TextureLayerImpl::SetNearestNeighbor(bool nearest_neighbor) { |
| 218 nearest_neighbor_ = nearest_neighbor; | 218 nearest_neighbor_ = nearest_neighbor; |
| 219 SetNeedsPushProperties(); | 219 SetNeedsPushProperties(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void TextureLayerImpl::SetUVTopLeft(const gfx::PointF top_left) { | 222 void TextureLayerImpl::SetUVTopLeft(const gfx::PointF& top_left) { |
| 223 uv_top_left_ = top_left; | 223 uv_top_left_ = top_left; |
| 224 SetNeedsPushProperties(); | 224 SetNeedsPushProperties(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void TextureLayerImpl::SetUVBottomRight(const gfx::PointF bottom_right) { | 227 void TextureLayerImpl::SetUVBottomRight(const gfx::PointF& bottom_right) { |
| 228 uv_bottom_right_ = bottom_right; | 228 uv_bottom_right_ = bottom_right; |
| 229 SetNeedsPushProperties(); | 229 SetNeedsPushProperties(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 // 1--2 | 232 // 1--2 |
| 233 // | | | 233 // | | |
| 234 // 0--3 | 234 // 0--3 |
| 235 void TextureLayerImpl::SetVertexOpacity(const float vertex_opacity[4]) { | 235 void TextureLayerImpl::SetVertexOpacity(const float vertex_opacity[4]) { |
| 236 vertex_opacity_[0] = vertex_opacity[0]; | 236 vertex_opacity_[0] = vertex_opacity[0]; |
| 237 vertex_opacity_[1] = vertex_opacity[1]; | 237 vertex_opacity_[1] = vertex_opacity[1]; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 257 } else if (external_texture_resource_) { | 257 } else if (external_texture_resource_) { |
| 258 DCHECK(!own_mailbox_); | 258 DCHECK(!own_mailbox_); |
| 259 ResourceProvider* resource_provider = | 259 ResourceProvider* resource_provider = |
| 260 layer_tree_impl()->resource_provider(); | 260 layer_tree_impl()->resource_provider(); |
| 261 resource_provider->DeleteResource(external_texture_resource_); | 261 resource_provider->DeleteResource(external_texture_resource_); |
| 262 external_texture_resource_ = 0; | 262 external_texture_resource_ = 0; |
| 263 } | 263 } |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace cc | 266 } // namespace cc |
| OLD | NEW |