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..867540b4791bf89effa0cfa7544b4ddbd39e1eac 100644 |
--- a/cc/test/test_context_provider.cc |
+++ b/cc/test/test_context_provider.cc |
@@ -71,7 +71,10 @@ 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), |
+ context_lost_(false) { |
DCHECK(main_thread_checker_.CalledOnValidThread()); |
DCHECK(context3d_); |
context_thread_checker_.DetachFromThread(); |
@@ -139,6 +142,17 @@ class GrContext* TestContextProvider::GrContext() { |
return NULL; |
} |
+bool TestContextProvider::IsContextLost() { |
+ DCHECK(context3d_); |
+ DCHECK(bound_); |
+ DCHECK(context_thread_checker_.CalledOnValidThread()); |
+ |
+ if (context_lost_) |
piman
2013/11/01 23:15:35
I couldn't locate a place where this is set.
|
+ return true; |
+ |
+ return context3d_->isContextLost(); |
+} |
+ |
void TestContextProvider::VerifyContexts() { |
DCHECK(context3d_); |
DCHECK(bound_); |
@@ -185,7 +199,6 @@ TestWebGraphicsContext3D* TestContextProvider::TestContext3d() { |
TestWebGraphicsContext3D* TestContextProvider::UnboundTestContext3d() { |
DCHECK(context3d_); |
- DCHECK(context_thread_checker_.CalledOnValidThread()); |
return context3d_.get(); |
} |