| Index: gpu/command_buffer/client/share_group.h
|
| diff --git a/gpu/command_buffer/client/share_group.h b/gpu/command_buffer/client/share_group.h
|
| index 066c6e6266596bf3ac15db0a1ba8b840163afbe0..091b69f2385034d354e2f5946dcecabc67d4d2a2 100644
|
| --- a/gpu/command_buffer/client/share_group.h
|
| +++ b/gpu/command_buffer/client/share_group.h
|
| @@ -11,6 +11,7 @@
|
| #include <memory>
|
|
|
| #include "base/macros.h"
|
| +#include "base/synchronization/lock.h"
|
| #include "gles2_impl_export.h"
|
| #include "gpu/command_buffer/client/ref_counted.h"
|
| #include "gpu/command_buffer/common/gles2_cmd_format.h"
|
| @@ -146,13 +147,20 @@ class GLES2_IMPL_EXPORT ShareGroup
|
|
|
| uint64_t TracingGUID() const { return tracing_guid_; }
|
|
|
| + // Mark the ShareGroup as lost when an error occurs on any context in the
|
| + // group. This is thread safe as contexts may be on different threads.
|
| + void Lose();
|
| + // Report if any context in the ShareGroup has reported itself lost. This is
|
| + // thread safe as contexts may be on different threads.
|
| + bool IsLost() const;
|
| +
|
| private:
|
| friend class gpu::RefCountedThreadSafe<ShareGroup>;
|
| friend class gpu::gles2::GLES2ImplementationTest;
|
| ~ShareGroup();
|
|
|
| // Install a new program info manager. Used for testing only;
|
| - void set_program_info_manager(ProgramInfoManager* manager);
|
| + void SetProgramInfoManagerForTesting(ProgramInfoManager* manager);
|
|
|
| std::unique_ptr<IdHandlerInterface>
|
| id_handlers_[id_namespaces::kNumIdNamespaces];
|
| @@ -163,6 +171,9 @@ class GLES2_IMPL_EXPORT ShareGroup
|
| bool bind_generates_resource_;
|
| uint64_t tracing_guid_;
|
|
|
| + mutable base::Lock lost_lock_;
|
| + bool lost_ = false;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ShareGroup);
|
| };
|
|
|
|
|