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

Unified Diff: cc/layers/texture_layer_impl.cc

Issue 15001027: [Aura] Added Support for rendering software compositor frames as cc::TextureLayers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 6 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
Index: cc/layers/texture_layer_impl.cc
diff --git a/cc/layers/texture_layer_impl.cc b/cc/layers/texture_layer_impl.cc
index 44062975bf8949c2899f854e2f7c92eb5c473c9e..dfc504bfc5d559de64f7819f4023a77bad9ccba6 100644
--- a/cc/layers/texture_layer_impl.cc
+++ b/cc/layers/texture_layer_impl.cc
@@ -16,13 +16,13 @@ TextureLayerImpl::TextureLayerImpl(LayerTreeImpl* tree_impl,
int id,
bool uses_mailbox)
: LayerImpl(tree_impl, id),
+ uses_mailbox_(uses_mailbox),
texture_id_(0),
external_texture_resource_(0),
premultiplied_alpha_(true),
flipped_(true),
uv_top_left_(0.f, 0.f),
uv_bottom_right_(1.f, 1.f),
- uses_mailbox_(uses_mailbox),
own_mailbox_(false) {
vertex_opacity_[0] = 1.0f;
vertex_opacity_[1] = 1.0f;
@@ -30,11 +30,12 @@ TextureLayerImpl::TextureLayerImpl(LayerTreeImpl* tree_impl,
vertex_opacity_[3] = 1.0f;
}
-TextureLayerImpl::~TextureLayerImpl() { FreeTextureMailbox(); }
+TextureLayerImpl::~TextureLayerImpl() {
+ FreeTextureMailbox();
+}
void TextureLayerImpl::SetTextureMailbox(const TextureMailbox& mailbox) {
DCHECK(uses_mailbox_);
- DCHECK(mailbox.IsEmpty() || !mailbox.Equals(texture_mailbox_));
piman 2013/06/05 00:30:55 Same here - leave this in?
slavi 2013/06/06 23:02:47 Done.
FreeTextureMailbox();
texture_mailbox_ = mailbox;
own_mailbox_ = true;
@@ -146,7 +147,7 @@ void TextureLayerImpl::DidBecomeActive() {
return;
DCHECK(!external_texture_resource_);
ResourceProvider* resource_provider = layer_tree_impl()->resource_provider();
- if (!texture_mailbox_.IsEmpty()) {
+ if (texture_mailbox_.IsValid()) {
external_texture_resource_ =
resource_provider->CreateResourceFromTextureMailbox(texture_mailbox_);
}

Powered by Google App Engine
This is Rietveld 408576698