Chromium Code Reviews| Index: ui/compositor/layer.cc |
| diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc |
| index a1184dd51f4cb6d79234a5c8b9ea62c97c1c3bf7..0add649c45165fc3b89b19929f35c553bad77753 100644 |
| --- a/ui/compositor/layer.cc |
| +++ b/ui/compositor/layer.cc |
| @@ -20,6 +20,7 @@ |
| #include "cc/output/filter_operation.h" |
| #include "cc/output/filter_operations.h" |
| #include "cc/resources/transferable_resource.h" |
| +#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| #include "ui/compositor/compositor_switches.h" |
| #include "ui/compositor/dip_util.h" |
| #include "ui/compositor/layer_animator.h" |
| @@ -647,11 +648,15 @@ unsigned Layer::PrepareTexture() { |
| return texture_->PrepareTexture(); |
| } |
| -WebKit::WebGraphicsContext3D* Layer::Context3d() { |
| - DCHECK(texture_layer_.get()); |
| +bool Layer::IsContextLost() { |
| + if (texture_.get()) |
| + return texture_->HostContext3D()->isContextLost(); |
| + return false; |
| +} |
| + |
| +void Layer::RateLimitContext() { |
| if (texture_.get()) |
| - return texture_->HostContext3D(); |
| - return NULL; |
| + texture_->HostContext3D()->rateLimitOffscreenContextCHROMIUM(); |
|
piman
2013/11/01 23:15:35
note: we don't use rate limiting for ui::Layer any
|
| } |
| bool Layer::PrepareTextureMailbox( |