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 "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h" | 5 #include "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h" |
6 | 6 |
7 #include "cc/layers/texture_layer.h" | 7 #include "cc/layers/texture_layer.h" |
8 #include "cc/resources/resource_update_queue.h" | 8 #include "cc/resources/resource_update_queue.h" |
9 #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h" | 9 #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h" |
10 #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h" | 10 #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void WebExternalTextureLayerImpl::setOpaque(bool opaque) { | 66 void WebExternalTextureLayerImpl::setOpaque(bool opaque) { |
67 static_cast<TextureLayer*>(layer_->layer())->SetContentsOpaque(opaque); | 67 static_cast<TextureLayer*>(layer_->layer())->SetContentsOpaque(opaque); |
68 } | 68 } |
69 | 69 |
70 void WebExternalTextureLayerImpl::setPremultipliedAlpha( | 70 void WebExternalTextureLayerImpl::setPremultipliedAlpha( |
71 bool premultiplied_alpha) { | 71 bool premultiplied_alpha) { |
72 static_cast<TextureLayer*>(layer_->layer())->SetPremultipliedAlpha( | 72 static_cast<TextureLayer*>(layer_->layer())->SetPremultipliedAlpha( |
73 premultiplied_alpha); | 73 premultiplied_alpha); |
74 } | 74 } |
75 | 75 |
| 76 #if WEB_EXTERNAL_TEXTURE_LAYER_HAS_BLEND_BACKGROUND_COLOR |
| 77 void WebExternalTextureLayerImpl::setBlendBackgroundColor(bool blend) { |
| 78 static_cast<TextureLayer*>(layer_->layer())->SetBlendBackgroundColor(blend); |
| 79 } |
| 80 #endif // WEB_EXTERNAL_TEXTURE_LAYER_HAS_BLEND_BACKGROUND_COLOR |
| 81 |
76 void WebExternalTextureLayerImpl::willModifyTexture() { | 82 void WebExternalTextureLayerImpl::willModifyTexture() { |
77 static_cast<TextureLayer*>(layer_->layer())->WillModifyTexture(); | 83 static_cast<TextureLayer*>(layer_->layer())->WillModifyTexture(); |
78 } | 84 } |
79 | 85 |
80 void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) { | 86 void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) { |
81 static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit); | 87 static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit); |
82 } | 88 } |
83 | 89 |
84 class WebTextureUpdaterImpl : public WebKit::WebTextureUpdater { | 90 class WebTextureUpdaterImpl : public WebKit::WebTextureUpdater { |
85 public: | 91 public: |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 167 |
162 WebKit::WebExternalTextureMailbox available_mailbox; | 168 WebKit::WebExternalTextureMailbox available_mailbox; |
163 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); | 169 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); |
164 available_mailbox.syncPoint = sync_point; | 170 available_mailbox.syncPoint = sync_point; |
165 if (bitmap) | 171 if (bitmap) |
166 layer->free_bitmaps_.push_back(bitmap); | 172 layer->free_bitmaps_.push_back(bitmap); |
167 layer->client_->mailboxReleased(available_mailbox); | 173 layer->client_->mailboxReleased(available_mailbox); |
168 } | 174 } |
169 | 175 |
170 } // namespace webkit | 176 } // namespace webkit |
OLD | NEW |