Chromium Code Reviews| Index: cc/texture_layer.cc |
| diff --git a/cc/texture_layer.cc b/cc/texture_layer.cc |
| index ffb22ac0ed9dee71993e9b3afe0befd5a93650e5..b60a6477d71d11797a398bd22c107072a0af1a31 100644 |
| --- a/cc/texture_layer.cc |
| +++ b/cc/texture_layer.cc |
| @@ -26,12 +26,9 @@ static void PostCallbackToMainThread( |
| base::Bind(&RunCallbackOnMainThread, callback, sync_point)); |
| } |
| -scoped_refptr<TextureLayer> TextureLayer::Create(TextureLayerClient* client) { |
| - return scoped_refptr<TextureLayer>(new TextureLayer(client, false)); |
| -} |
| - |
| -scoped_refptr<TextureLayer> TextureLayer::CreateForMailbox() { |
| - return scoped_refptr<TextureLayer>(new TextureLayer(NULL, true)); |
| +scoped_refptr<TextureLayer> TextureLayer::Create(TextureLayerClient* client, |
| + bool usesMailbox) { |
|
piman
2013/03/14 19:54:58
nit: uses_mailbox
alexst (slow to review)
2013/03/14 20:37:06
Done.
|
| + return scoped_refptr<TextureLayer>(new TextureLayer(client, usesMailbox)); |
| } |
| TextureLayer::TextureLayer(TextureLayerClient* client, bool uses_mailbox) |
| @@ -158,7 +155,13 @@ void TextureLayer::Update(ResourceUpdateQueue* queue, |
| const OcclusionTracker* occlusion, |
| RenderingStats* stats) { |
| if (client_) { |
| - texture_id_ = client_->prepareTexture(*queue); |
| + if (uses_mailbox_) { |
| + TextureMailbox mailbox; |
| + if (client_->prepareTextureMailbox(&mailbox)) |
| + SetTextureMailbox(mailbox); |
|
piman
2013/03/14 19:54:58
How hard would it be to change the BrowserPluginCo
alexst (slow to review)
2013/03/14 20:37:06
Shouldn't be too bad, I'll look into it.
As far a
|
| + } else { |
| + texture_id_ = client_->prepareTexture(*queue); |
| + } |
| context_lost_ = |
| client_->context()->getGraphicsResetStatusARB() != GL_NO_ERROR; |
| } |