| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/blink/web_external_texture_layer_impl.h" | 5 #include "cc/blink/web_external_texture_layer_impl.h" |
| 6 | 6 |
| 7 #include "cc/blink/web_external_bitmap_impl.h" | 7 #include "cc/blink/web_external_bitmap_impl.h" |
| 8 #include "cc/blink/web_layer_impl.h" | 8 #include "cc/blink/web_layer_impl.h" |
| 9 #include "cc/layers/texture_layer.h" | 9 #include "cc/layers/texture_layer.h" |
| 10 #include "cc/resources/single_release_callback.h" | 10 #include "cc/resources/single_release_callback.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 void WebExternalTextureLayerImpl::setPremultipliedAlpha( | 50 void WebExternalTextureLayerImpl::setPremultipliedAlpha( |
| 51 bool premultiplied_alpha) { | 51 bool premultiplied_alpha) { |
| 52 static_cast<TextureLayer*>(layer_->layer()) | 52 static_cast<TextureLayer*>(layer_->layer()) |
| 53 ->SetPremultipliedAlpha(premultiplied_alpha); | 53 ->SetPremultipliedAlpha(premultiplied_alpha); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void WebExternalTextureLayerImpl::setBlendBackgroundColor(bool blend) { | 56 void WebExternalTextureLayerImpl::setBlendBackgroundColor(bool blend) { |
| 57 static_cast<TextureLayer*>(layer_->layer())->SetBlendBackgroundColor(blend); | 57 static_cast<TextureLayer*>(layer_->layer())->SetBlendBackgroundColor(blend); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) { | |
| 61 static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit); | |
| 62 } | |
| 63 | |
| 64 void WebExternalTextureLayerImpl::setNearestNeighbor(bool nearest_neighbor) { | 60 void WebExternalTextureLayerImpl::setNearestNeighbor(bool nearest_neighbor) { |
| 65 static_cast<TextureLayer*>(layer_->layer()) | 61 static_cast<TextureLayer*>(layer_->layer()) |
| 66 ->SetNearestNeighbor(nearest_neighbor); | 62 ->SetNearestNeighbor(nearest_neighbor); |
| 67 } | 63 } |
| 68 | 64 |
| 69 bool WebExternalTextureLayerImpl::PrepareTextureMailbox( | 65 bool WebExternalTextureLayerImpl::PrepareTextureMailbox( |
| 70 cc::TextureMailbox* mailbox, | 66 cc::TextureMailbox* mailbox, |
| 71 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 67 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| 72 bool use_shared_memory) { | 68 bool use_shared_memory) { |
| 73 blink::WebExternalTextureMailbox client_mailbox; | 69 blink::WebExternalTextureMailbox client_mailbox; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 DCHECK(layer); | 117 DCHECK(layer); |
| 122 blink::WebExternalTextureMailbox available_mailbox; | 118 blink::WebExternalTextureMailbox available_mailbox; |
| 123 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); | 119 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); |
| 124 available_mailbox.syncPoint = sync_point; | 120 available_mailbox.syncPoint = sync_point; |
| 125 if (bitmap) | 121 if (bitmap) |
| 126 layer->free_bitmaps_.push_back(bitmap); | 122 layer->free_bitmaps_.push_back(bitmap); |
| 127 layer->client_->mailboxReleased(available_mailbox, lost_resource); | 123 layer->client_->mailboxReleased(available_mailbox, lost_resource); |
| 128 } | 124 } |
| 129 | 125 |
| 130 } // namespace cc_blink | 126 } // namespace cc_blink |
| OLD | NEW |