Do not use notify feature of testDeviceLost.
This is part one of a simplification of testDeviceLost. This
patch changes the instances where we would use the notify
parameter to notify the Display directly. We can do this
by using the Display attached to the Renderer in some cases.
BUG=angle:795
Change-Id: I24fd827989d47b0b2cefef7afb99fa62581ddc1b
Reviewed-on: https://chromium-review.googlesource.com/228910
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index e5fff14..c3d65f6 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -12,6 +12,7 @@
#include "common/utilities.h"
#include "common/platform.h"
#include "libANGLE/Buffer.h"
+#include "libANGLE/Display.h"
#include "libANGLE/Fence.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/FramebufferAttachment.h"
@@ -21,6 +22,7 @@
#include "libANGLE/Query.h"
#include "libANGLE/ResourceManager.h"
#include "libANGLE/Sampler.h"
+#include "libANGLE/Surface.h"
#include "libANGLE/Texture.h"
#include "libANGLE/TransformFeedback.h"
#include "libANGLE/VertexArray.h"
@@ -28,8 +30,6 @@
#include "libANGLE/validationES.h"
#include "libANGLE/renderer/Renderer.h"
-#include "libANGLE/Surface.h"
-
#include <sstream>
#include <iterator>
@@ -1387,7 +1387,10 @@
{
// mResetStatus will be set by the markContextLost callback
// in the case a notification is sent
- mRenderer->testDeviceLost(true);
+ if (mRenderer->testDeviceLost(false))
+ {
+ mRenderer->notifyDeviceLost();
+ }
}
GLenum status = mResetStatus;