Chromium Code Reviews| Index: cc/layers/texture_layer.cc |
| diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc |
| index 45a456e523719afd15adf422249bbb7f34ba950b..a77d9c94f737a2108d44dfeb9fa19429728ec4d2 100644 |
| --- a/cc/layers/texture_layer.cc |
| +++ b/cc/layers/texture_layer.cc |
| @@ -50,7 +50,7 @@ TextureLayer::~TextureLayer() { |
| void TextureLayer::ClearClient() { |
| if (rate_limit_context_ && client_ && layer_tree_host()) |
| - layer_tree_host()->StopRateLimiter(client_->Context3d()); |
| + layer_tree_host()->StopRateLimiter(client_); |
| client_ = NULL; |
| if (uses_mailbox_) |
| SetTextureMailbox(TextureMailbox(), scoped_ptr<SingleReleaseCallback>()); |
| @@ -114,7 +114,7 @@ void TextureLayer::SetBlendBackgroundColor(bool blend) { |
| void TextureLayer::SetRateLimitContext(bool rate_limit) { |
| if (!rate_limit && rate_limit_context_ && client_ && layer_tree_host()) |
| - layer_tree_host()->StopRateLimiter(client_->Context3d()); |
| + layer_tree_host()->StopRateLimiter(client_); |
| rate_limit_context_ = rate_limit; |
| } |
| @@ -178,7 +178,7 @@ void TextureLayer::SetNeedsDisplayRect(const gfx::RectF& dirty_rect) { |
| Layer::SetNeedsDisplayRect(dirty_rect); |
| if (rate_limit_context_ && client_ && layer_tree_host() && DrawsContent()) |
| - layer_tree_host()->StartRateLimiter(client_->Context3d()); |
| + layer_tree_host()->StartRateLimiter(client_); |
| } |
| void TextureLayer::SetLayerTreeHost(LayerTreeHost* host) { |
| @@ -195,7 +195,7 @@ void TextureLayer::SetLayerTreeHost(LayerTreeHost* host) { |
| SetNextCommitWaitsForActivation(); |
| } |
| if (rate_limit_context_ && client_) |
| - layer_tree_host()->StopRateLimiter(client_->Context3d()); |
| + layer_tree_host()->StopRateLimiter(client_); |
| } |
| // If we're removed from the tree, the TextureLayerImpl will be destroyed, and |
| // we will need to set the mailbox again on a new TextureLayerImpl the next |
| @@ -233,9 +233,8 @@ bool TextureLayer::Update(ResourceUpdateQueue* queue, |
| } |
| } else { |
| texture_id_ = client_->PrepareTexture(); |
| - DCHECK_EQ(!!texture_id_, !!client_->Context3d()); |
| - if (client_->Context3d() && |
| - client_->Context3d()->getGraphicsResetStatusARB() != GL_NO_ERROR) |
| + DCHECK_EQ(!!texture_id_, !client_->IsContextLost()); |
|
piman
2013/11/01 23:15:35
I don't think this DCHECK is valid. For example, t
|
| + if (client_->IsContextLost()) |
| texture_id_ = 0; |
| updated = true; |
| SetNeedsPushProperties(); |