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

Unified Diff: cc/layers/texture_layer.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/texture_layer.h ('k') | cc/layers/texture_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer.cc
diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc
index 96bed22a4a144003cacbc92e84fdedc6b7350aee..4264df2bb489a906297aa59cd28a6b4736a51742 100644
--- a/cc/layers/texture_layer.cc
+++ b/cc/layers/texture_layer.cc
@@ -31,6 +31,7 @@ TextureLayer::TextureLayer(TextureLayerClient* client, bool uses_mailbox)
uv_top_left_(0.f, 0.f),
uv_bottom_right_(1.f, 1.f),
premultiplied_alpha_(true),
+ blend_background_color_(false),
rate_limit_context_(false),
content_committed_(false),
texture_id_(0),
@@ -105,6 +106,13 @@ void TextureLayer::SetPremultipliedAlpha(bool premultiplied_alpha) {
SetNeedsCommit();
}
+void TextureLayer::SetBlendBackgroundColor(bool blend) {
+ if (blend_background_color_ == blend)
+ return;
+ blend_background_color_ = blend;
+ SetNeedsCommit();
+}
+
void TextureLayer::SetRateLimitContext(bool rate_limit) {
if (!rate_limit && rate_limit_context_ && client_ && layer_tree_host())
layer_tree_host()->StopRateLimiter(client_->Context3d());
@@ -202,6 +210,7 @@ void TextureLayer::PushPropertiesTo(LayerImpl* layer) {
texture_layer->set_uv_bottom_right(uv_bottom_right_);
texture_layer->set_vertex_opacity(vertex_opacity_);
texture_layer->set_premultiplied_alpha(premultiplied_alpha_);
+ texture_layer->set_blend_background_color(blend_background_color_);
if (uses_mailbox_ && needs_set_mailbox_) {
TextureMailbox texture_mailbox;
if (holder_ref_) {
« no previous file with comments | « cc/layers/texture_layer.h ('k') | cc/layers/texture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698