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

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: resolved conflicts with TOT 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
« no previous file with comments | « webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 void WebExternalTextureLayerImpl::setOpaque(bool opaque) { 42 void WebExternalTextureLayerImpl::setOpaque(bool opaque) {
43 static_cast<TextureLayer*>(layer_->layer())->SetContentsOpaque(opaque); 43 static_cast<TextureLayer*>(layer_->layer())->SetContentsOpaque(opaque);
44 } 44 }
45 45
46 void WebExternalTextureLayerImpl::setPremultipliedAlpha( 46 void WebExternalTextureLayerImpl::setPremultipliedAlpha(
47 bool premultiplied_alpha) { 47 bool premultiplied_alpha) {
48 static_cast<TextureLayer*>(layer_->layer())->SetPremultipliedAlpha( 48 static_cast<TextureLayer*>(layer_->layer())->SetPremultipliedAlpha(
49 premultiplied_alpha); 49 premultiplied_alpha);
50 } 50 }
51 51
52 void WebExternalTextureLayerImpl::setBlendBackgroundColor(bool blend) {
53 static_cast<TextureLayer*>(layer_->layer())->SetBlendBackgroundColor(blend);
54 }
55
52 void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) { 56 void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) {
53 static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit); 57 static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit);
54 } 58 }
55 59
56 unsigned WebExternalTextureLayerImpl::PrepareTexture() { 60 unsigned WebExternalTextureLayerImpl::PrepareTexture() {
57 NOTREACHED(); 61 NOTREACHED();
58 return 0; 62 return 0;
59 } 63 }
60 64
61 WebKit::WebGraphicsContext3D* WebExternalTextureLayerImpl::Context3d() { 65 WebKit::WebGraphicsContext3D* WebExternalTextureLayerImpl::Context3d() {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 119
116 WebKit::WebExternalTextureMailbox available_mailbox; 120 WebKit::WebExternalTextureMailbox available_mailbox;
117 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); 121 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name));
118 available_mailbox.syncPoint = sync_point; 122 available_mailbox.syncPoint = sync_point;
119 if (bitmap) 123 if (bitmap)
120 layer->free_bitmaps_.push_back(bitmap); 124 layer->free_bitmaps_.push_back(bitmap);
121 layer->client_->mailboxReleased(available_mailbox); 125 layer->client_->mailboxReleased(available_mailbox);
122 } 126 }
123 127
124 } // namespace webkit 128 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698