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

Unified Diff: cc/layers/texture_layer.cc

Issue 51653008: Remove WGC3D::isContextLost references from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 1 month 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 | « no previous file | cc/layers/texture_layer_client.h » ('j') | cc/output/gl_renderer.h » ('J')
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 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();
« no previous file with comments | « no previous file | cc/layers/texture_layer_client.h » ('j') | cc/output/gl_renderer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698