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 #include "cc/layers/texture_layer.h" | 5 #include "cc/layers/texture_layer.h" |
6 | 6 |
7 #include "cc/base/thread.h" | 7 #include "cc/base/thread.h" |
8 #include "cc/layers/texture_layer_client.h" | 8 #include "cc/layers/texture_layer_client.h" |
9 #include "cc/layers/texture_layer_impl.h" | 9 #include "cc/layers/texture_layer_impl.h" |
10 #include "cc/trees/layer_tree_host.h" | 10 #include "cc/trees/layer_tree_host.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 TextureLayer::TextureLayer(TextureLayerClient* client, bool uses_mailbox) | 37 TextureLayer::TextureLayer(TextureLayerClient* client, bool uses_mailbox) |
38 : Layer(), | 38 : Layer(), |
39 client_(client), | 39 client_(client), |
40 uses_mailbox_(uses_mailbox), | 40 uses_mailbox_(uses_mailbox), |
41 flipped_(true), | 41 flipped_(true), |
42 uv_top_left_(0.f, 0.f), | 42 uv_top_left_(0.f, 0.f), |
43 uv_bottom_right_(1.f, 1.f), | 43 uv_bottom_right_(1.f, 1.f), |
44 premultiplied_alpha_(true), | 44 premultiplied_alpha_(true), |
45 rate_limit_context_(false), | 45 rate_limit_context_(false), |
46 context_lost_(false), | 46 context_lost_(false), |
| 47 content_committed_(false), |
47 texture_id_(0), | 48 texture_id_(0), |
48 content_committed_(false), | |
49 own_mailbox_(false) { | 49 own_mailbox_(false) { |
50 vertex_opacity_[0] = 1.0f; | 50 vertex_opacity_[0] = 1.0f; |
51 vertex_opacity_[1] = 1.0f; | 51 vertex_opacity_[1] = 1.0f; |
52 vertex_opacity_[2] = 1.0f; | 52 vertex_opacity_[2] = 1.0f; |
53 vertex_opacity_[3] = 1.0f; | 53 vertex_opacity_[3] = 1.0f; |
54 } | 54 } |
55 | 55 |
56 TextureLayer::~TextureLayer() { | 56 TextureLayer::~TextureLayer() { |
57 if (layer_tree_host()) { | 57 if (layer_tree_host()) { |
58 if (texture_id_) | 58 if (texture_id_) |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // triple-buffered. Single-buffered layers already prevent draws, so | 200 // triple-buffered. Single-buffered layers already prevent draws, so |
201 // can block too for simplicity. | 201 // can block too for simplicity. |
202 return DrawsContent(); | 202 return DrawsContent(); |
203 } | 203 } |
204 | 204 |
205 bool TextureLayer::CanClipSelf() const { | 205 bool TextureLayer::CanClipSelf() const { |
206 return true; | 206 return true; |
207 } | 207 } |
208 | 208 |
209 } // namespace cc | 209 } // namespace cc |
OLD | NEW |