| 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 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) | 94 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) |
| 95 OVERRIDE; | 95 OVERRIDE; |
| 96 | 96 |
| 97 // Sets whether this texture should be Y-flipped at draw time. Defaults to | 97 // Sets whether this texture should be Y-flipped at draw time. Defaults to |
| 98 // true. | 98 // true. |
| 99 void SetFlipped(bool flipped); | 99 void SetFlipped(bool flipped); |
| 100 | 100 |
| 101 // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1). | 101 // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1). |
| 102 void SetUV(gfx::PointF top_left, gfx::PointF bottom_right); | 102 void SetUV(const gfx::PointF& top_left, const gfx::PointF& bottom_right); |
| 103 | 103 |
| 104 // Sets an opacity value per vertex. It will be multiplied by the layer | 104 // Sets an opacity value per vertex. It will be multiplied by the layer |
| 105 // opacity value. | 105 // opacity value. |
| 106 void SetVertexOpacity(float bottom_left, | 106 void SetVertexOpacity(float bottom_left, |
| 107 float top_left, | 107 float top_left, |
| 108 float top_right, | 108 float top_right, |
| 109 float bottom_right); | 109 float bottom_right); |
| 110 | 110 |
| 111 // Sets whether the alpha channel is premultiplied or unpremultiplied. | 111 // Sets whether the alpha channel is premultiplied or unpremultiplied. |
| 112 // Defaults to true. | 112 // Defaults to true. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 unsigned texture_id_; | 167 unsigned texture_id_; |
| 168 scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_; | 168 scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_; |
| 169 bool needs_set_mailbox_; | 169 bool needs_set_mailbox_; |
| 170 | 170 |
| 171 DISALLOW_COPY_AND_ASSIGN(TextureLayer); | 171 DISALLOW_COPY_AND_ASSIGN(TextureLayer); |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 } // namespace cc | 174 } // namespace cc |
| 175 #endif // CC_LAYERS_TEXTURE_LAYER_H_ | 175 #endif // CC_LAYERS_TEXTURE_LAYER_H_ |
| OLD | NEW |