OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 #ifndef CC_LAYERS_TEXTURE_LAYER_H_ | 5 #ifndef CC_LAYERS_TEXTURE_LAYER_H_ |
6 #define CC_LAYERS_TEXTURE_LAYER_H_ | 6 #define CC_LAYERS_TEXTURE_LAYER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void ClearClient(); | 92 void ClearClient(); |
93 | 93 |
94 // Resets the texture. | 94 // Resets the texture. |
95 void ClearTexture(); | 95 void ClearTexture(); |
96 | 96 |
97 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 97 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
98 | 98 |
99 // Sets whether this texture should be Y-flipped at draw time. Defaults to | 99 // Sets whether this texture should be Y-flipped at draw time. Defaults to |
100 // true. | 100 // true. |
101 void SetFlipped(bool flipped); | 101 void SetFlipped(bool flipped); |
102 bool flipped() const { return flipped_; } | |
103 | 102 |
104 // Sets whether this texture should use nearest neighbor interpolation as | 103 // Sets whether this texture should use nearest neighbor interpolation as |
105 // opposed to bilinear. Defaults to false. | 104 // opposed to bilinear. Defaults to false. |
106 void SetNearestNeighbor(bool nearest_neighbor); | 105 void SetNearestNeighbor(bool nearest_neighbor); |
107 | 106 |
108 // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1). | 107 // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1). |
109 void SetUV(const gfx::PointF& top_left, const gfx::PointF& bottom_right); | 108 void SetUV(const gfx::PointF& top_left, const gfx::PointF& bottom_right); |
110 | 109 |
111 // Sets an opacity value per vertex. It will be multiplied by the layer | 110 // Sets an opacity value per vertex. It will be multiplied by the layer |
112 // opacity value. | 111 // opacity value. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 bool rate_limit_context_; | 170 bool rate_limit_context_; |
172 | 171 |
173 scoped_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; | 172 scoped_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; |
174 bool needs_set_mailbox_; | 173 bool needs_set_mailbox_; |
175 | 174 |
176 DISALLOW_COPY_AND_ASSIGN(TextureLayer); | 175 DISALLOW_COPY_AND_ASSIGN(TextureLayer); |
177 }; | 176 }; |
178 | 177 |
179 } // namespace cc | 178 } // namespace cc |
180 #endif // CC_LAYERS_TEXTURE_LAYER_H_ | 179 #endif // CC_LAYERS_TEXTURE_LAYER_H_ |
OLD | NEW |