Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Unified Diff: Source/core/html/canvas/WebGLRenderingContext.h

Issue 14840015: Lose/restore WebGL contexts if multisampling blackist status changes at runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed settings to pass by const reference Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/html/canvas/WebGLRenderingContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGLRenderingContext.h
diff --git a/Source/core/html/canvas/WebGLRenderingContext.h b/Source/core/html/canvas/WebGLRenderingContext.h
index 5314306c138a2396bd33bbcb2c1fd2d21cfa6209..16c7fb71c2bd029dd8eb0ffb3d58f92d35c34ea1 100644
--- a/Source/core/html/canvas/WebGLRenderingContext.h
+++ b/Source/core/html/canvas/WebGLRenderingContext.h
@@ -29,6 +29,7 @@
#include "core/dom/ActiveDOMObject.h"
#include "core/html/canvas/CanvasRenderingContext.h"
#include "core/html/canvas/WebGLGetInfo.h"
+#include "core/page/Page.h"
#include "core/platform/Timer.h"
#include "core/platform/graphics/GraphicsContext3D.h"
#include "core/platform/graphics/ImageBuffer.h"
@@ -80,7 +81,7 @@ class WebGLVertexArrayObjectOES;
typedef int ExceptionCode;
-class WebGLRenderingContext : public CanvasRenderingContext, public ActiveDOMObject {
+class WebGLRenderingContext : public CanvasRenderingContext, public ActiveDOMObject, private Page::MultisamplingChangedObserver {
public:
static PassOwnPtr<WebGLRenderingContext> create(HTMLCanvasElement*, WebGLContextAttributes*);
virtual ~WebGLRenderingContext();
@@ -294,7 +295,10 @@ public:
RealLostContext,
// Lost context provoked by WEBKIT_lose_context.
- SyntheticLostContext
+ SyntheticLostContext,
+
+ // A synthetic lost context that should attempt to recover automatically
+ AutoRecoverSyntheticLostContext
};
void forceLostContext(LostContextMode);
void forceRestoreContext();
@@ -331,7 +335,7 @@ public:
friend class WebGLRenderingContextErrorMessageCallback;
friend class WebGLVertexArrayObjectOES;
- WebGLRenderingContext(HTMLCanvasElement*, PassRefPtr<GraphicsContext3D>, GraphicsContext3D::Attributes);
+ WebGLRenderingContext(HTMLCanvasElement*, PassRefPtr<GraphicsContext3D>, GraphicsContext3D::Attributes, GraphicsContext3D::Attributes);
void initializeNewContext();
void setupFlags();
@@ -493,6 +497,7 @@ public:
bool m_contextLost;
LostContextMode m_contextLostMode;
GraphicsContext3D::Attributes m_attributes;
+ GraphicsContext3D::Attributes m_requestedAttributes;
bool m_layerCleared;
GC3Dfloat m_clearColor[4];
@@ -769,6 +774,10 @@ public:
void restoreCurrentFramebuffer();
void restoreCurrentTexture2D();
+ virtual void multisamplingChanged(bool);
+ bool m_multisamplingAllowed;
+ bool m_multisamplingObserverRegistered;
+
friend class WebGLStateRestorer;
friend class WebGLRenderingContextEvictionManager;
« no previous file with comments | « no previous file | Source/core/html/canvas/WebGLRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698