diff options
author | crogers@google.com <crogers@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-03 18:34:33 +0000 |
---|---|---|
committer | crogers@google.com <crogers@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-03 18:34:33 +0000 |
commit | 37b80b5645f64db54dda5134d721a4ce37b8c34d (patch) | |
tree | 3be46914a1940e340796c6b348eb15fa5abaccd6 /gpu | |
parent | b249906f328ffe187dab2982ff448c2d0b576952 (diff) | |
download | chromium_src-37b80b5645f64db54dda5134d721a4ce37b8c34d.zip chromium_src-37b80b5645f64db54dda5134d721a4ce37b8c34d.tar.gz chromium_src-37b80b5645f64db54dda5134d721a4ce37b8c34d.tar.bz2 |
Revert 209673 "gpu: Propagate lost context signal to all contexts"
Speculative revert to try to fix 256903
BUG=256903
> gpu: Propagate lost context signal to all contexts
>
> When any individual command buffer context encounters a context lost
> event, propagate the context lost status to all other contexts if
> gfx::GLContext::LosesAllContextsOnContextLost() is true. This allows
> all command buffer clients to get notified of GPU resets. This is
> useful with virtual contexts because the reset is generally picked
> up by a random virtual context.
>
> Also, if virtual contexts are being used, all contexts should avoid
> doing GL object cleanup during teardown because the real context has
> already been lost at that point.
>
> BUG=232449
> TEST=https://www.khronos.org/registry/webgl/conformance-suites/1.0.1/extra/lots-of-polys-example.html
>
> Review URL: https://chromiumcodereview.appspot.com/17550012
TBR=skyostil@chromium.org
Review URL: https://codereview.chromium.org/18647004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210011 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 8 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.h | 6 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder_mock.h | 1 |
3 files changed, 1 insertions, 14 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 5b10fff..6ed619c 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -1510,7 +1510,6 @@ class GLES2DecoderImpl : public GLES2Decoder { size_t GetBackbufferMemoryTotal(); virtual bool WasContextLost() OVERRIDE; - virtual bool WasContextLostByRobustnessExtension() OVERRIDE; virtual void LoseContext(uint32 reset_status) OVERRIDE; #if defined(OS_MACOSX) @@ -1693,7 +1692,6 @@ class GLES2DecoderImpl : public GLES2Decoder { bool has_robustness_extension_; GLenum reset_status_; - bool reset_by_robustness_extension_; // These flags are used to override the state of the shared feature_info_ // member. Because the same FeatureInfo instance may be shared among many @@ -2152,7 +2150,6 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group) frame_number_(0), has_robustness_extension_(false), reset_status_(GL_NO_ERROR), - reset_by_robustness_extension_(false), force_webgl_glsl_validation_(false), derivatives_explicitly_enabled_(false), frag_depth_explicitly_enabled_(false), @@ -9002,7 +8999,6 @@ bool GLES2DecoderImpl::WasContextLost() { if (status != GL_NO_ERROR) { // The graphics card was reset. Signal a lost context to the application. reset_status_ = status; - reset_by_robustness_extension_ = true; LOG(ERROR) << (surface_->IsOffscreen() ? "Offscreen" : "Onscreen") << " context lost via ARB/EXT_robustness. Reset status = " << GLES2Util::GetStringEnum(status); @@ -9012,10 +9008,6 @@ bool GLES2DecoderImpl::WasContextLost() { return false; } -bool GLES2DecoderImpl::WasContextLostByRobustnessExtension() { - return WasContextLost() && reset_by_robustness_extension_; -} - void GLES2DecoderImpl::LoseContext(uint32 reset_status) { // Only loses the context once. if (reset_status_ != GL_NO_ERROR) { diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h index 4f66a62..97c8f58 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder.h @@ -218,13 +218,9 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, virtual base::TimeDelta GetTotalProcessingCommandsTime() = 0; virtual void AddProcessingCommandsTime(base::TimeDelta) = 0; - // Returns true if the context was lost either by GL_ARB_robustness, forced - // context loss or command buffer parse error. + // Returns true if the context was just lost due to e.g. GL_ARB_robustness. virtual bool WasContextLost() = 0; - // Returns true if the context was lost specifically by GL_ARB_robustness. - virtual bool WasContextLostByRobustnessExtension() = 0; - // Lose this context. virtual void LoseContext(uint32 reset_status) = 0; diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h index 5fe0600..abac629 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h @@ -107,7 +107,6 @@ class MockGLES2Decoder : public GLES2Decoder { MOCK_METHOD0(GetTotalProcessingCommandsTime, base::TimeDelta()); MOCK_METHOD1(AddProcessingCommandsTime, void(base::TimeDelta)); MOCK_METHOD0(WasContextLost, bool()); - MOCK_METHOD0(WasContextLostByRobustnessExtension, bool()); MOCK_METHOD1(LoseContext, void(uint32 reset_status)); DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); |