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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void WebExternalTextureLayerImpl::setOpaque(bool opaque) { | 65 void WebExternalTextureLayerImpl::setOpaque(bool opaque) { |
66 static_cast<TextureLayer*>(layer_->layer())->SetContentsOpaque(opaque); | 66 static_cast<TextureLayer*>(layer_->layer())->SetContentsOpaque(opaque); |
67 } | 67 } |
68 | 68 |
69 void WebExternalTextureLayerImpl::setPremultipliedAlpha( | 69 void WebExternalTextureLayerImpl::setPremultipliedAlpha( |
70 bool premultiplied_alpha) { | 70 bool premultiplied_alpha) { |
71 static_cast<TextureLayer*>(layer_->layer())->SetPremultipliedAlpha( | 71 static_cast<TextureLayer*>(layer_->layer())->SetPremultipliedAlpha( |
72 premultiplied_alpha); | 72 premultiplied_alpha); |
73 } | 73 } |
74 | 74 |
| 75 #if WEB_EXTERNAL_TEXTURE_LAYER_HAS_BLEND_BACKGROUND_COLOR |
| 76 void WebExternalTextureLayerImpl::setBlendBackgroundColor(bool blend) { |
| 77 static_cast<TextureLayer*>(layer_->layer())->SetBlendBackgroundColor(blend); |
| 78 } |
| 79 #endif // WEB_EXTERNAL_TEXTURE_LAYER_HAS_BLEND_BACKGROUND_COLOR |
| 80 |
75 void WebExternalTextureLayerImpl::willModifyTexture() { | 81 void WebExternalTextureLayerImpl::willModifyTexture() { |
76 static_cast<TextureLayer*>(layer_->layer())->WillModifyTexture(); | 82 static_cast<TextureLayer*>(layer_->layer())->WillModifyTexture(); |
77 } | 83 } |
78 | 84 |
79 void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) { | 85 void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) { |
80 static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit); | 86 static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit); |
81 } | 87 } |
82 | 88 |
83 class WebTextureUpdaterImpl : public WebKit::WebTextureUpdater { | 89 class WebTextureUpdaterImpl : public WebKit::WebTextureUpdater { |
84 public: | 90 public: |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if (lost_resource) | 137 if (lost_resource) |
132 return; | 138 return; |
133 | 139 |
134 WebKit::WebExternalTextureMailbox available_mailbox; | 140 WebKit::WebExternalTextureMailbox available_mailbox; |
135 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); | 141 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); |
136 available_mailbox.syncPoint = sync_point; | 142 available_mailbox.syncPoint = sync_point; |
137 client_->mailboxReleased(available_mailbox); | 143 client_->mailboxReleased(available_mailbox); |
138 } | 144 } |
139 | 145 |
140 } // namespace webkit | 146 } // namespace webkit |
OLD | NEW |