Index: cc/test/test_context_provider.cc |
diff --git a/cc/test/test_context_provider.cc b/cc/test/test_context_provider.cc |
index 61660ead0e103ae553255343826034128a37ad50..f1cdbb655443195c94145a6841a9350ae81aed7d 100644 |
--- a/cc/test/test_context_provider.cc |
+++ b/cc/test/test_context_provider.cc |
@@ -71,7 +71,9 @@ scoped_refptr<TestContextProvider> TestContextProvider::Create( |
TestContextProvider::TestContextProvider( |
scoped_ptr<TestWebGraphicsContext3D> context) |
- : context3d_(context.Pass()), bound_(false), destroyed_(false) { |
+ : context3d_(context.Pass()), |
+ bound_(false), |
+ destroyed_(false) { |
DCHECK(main_thread_checker_.CalledOnValidThread()); |
DCHECK(context3d_); |
context_thread_checker_.DetachFromThread(); |
@@ -139,6 +141,14 @@ class GrContext* TestContextProvider::GrContext() { |
return NULL; |
} |
+bool TestContextProvider::IsContextLost() { |
+ DCHECK(context3d_); |
+ DCHECK(bound_); |
+ DCHECK(context_thread_checker_.CalledOnValidThread()); |
+ |
+ return context3d_->isContextLost(); |
+} |
+ |
void TestContextProvider::VerifyContexts() { |
DCHECK(context3d_); |
DCHECK(bound_); |
@@ -185,7 +195,6 @@ TestWebGraphicsContext3D* TestContextProvider::TestContext3d() { |
TestWebGraphicsContext3D* TestContextProvider::UnboundTestContext3d() { |
DCHECK(context3d_); |
- DCHECK(context_thread_checker_.CalledOnValidThread()); |
return context3d_.get(); |
} |