Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc

Issue 18432002: Blend TextureLayer background-color at draw time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added non-premultiplied test Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 void WebExternalTextureLayerImpl::setBlendBackgroundColor(bool blend) {
77 static_cast<TextureLayer*>(layer_->layer())->SetBlendBackgroundColor(blend);
78 }
79
76 void WebExternalTextureLayerImpl::willModifyTexture() { 80 void WebExternalTextureLayerImpl::willModifyTexture() {
77 static_cast<TextureLayer*>(layer_->layer())->WillModifyTexture(); 81 static_cast<TextureLayer*>(layer_->layer())->WillModifyTexture();
78 } 82 }
79 83
80 void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) { 84 void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) {
81 static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit); 85 static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit);
82 } 86 }
83 87
84 class WebTextureUpdaterImpl : public WebKit::WebTextureUpdater { 88 class WebTextureUpdaterImpl : public WebKit::WebTextureUpdater {
85 public: 89 public:
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 165
162 WebKit::WebExternalTextureMailbox available_mailbox; 166 WebKit::WebExternalTextureMailbox available_mailbox;
163 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); 167 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name));
164 available_mailbox.syncPoint = sync_point; 168 available_mailbox.syncPoint = sync_point;
165 if (bitmap) 169 if (bitmap)
166 layer->free_bitmaps_.push_back(bitmap); 170 layer->free_bitmaps_.push_back(bitmap);
167 layer->client_->mailboxReleased(available_mailbox); 171 layer->client_->mailboxReleased(available_mailbox);
168 } 172 }
169 173
170 } // namespace webkit 174 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698