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

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: Created 7 years, 8 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') | Source/core/page/Settings.in » ('J')
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..654329188e2213a75a1367daa4ef5bf93824f7ba 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"
@@ -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,20 @@ public:
void restoreCurrentFramebuffer();
void restoreCurrentTexture2D();
+ class WebGLMultisamplingChangedObserver : public Page::MultisamplingChangedObserver, public RefCounted<WebGLMultisamplingChangedObserver> {
+ public:
+ WebGLMultisamplingChangedObserver(WebGLRenderingContext*, Page*);
+ virtual void multisamplingChanged(bool);
+ virtual ~WebGLMultisamplingChangedObserver();
+
+ private:
+ WebGLRenderingContext* m_context;
+ Page* m_page;
+ bool m_multisamplingAllowed;
+ };
+
+ RefPtr<WebGLMultisamplingChangedObserver> m_multisamplingChangedObserver;
+
friend class WebGLStateRestorer;
friend class WebGLRenderingContextEvictionManager;
« no previous file with comments | « no previous file | Source/core/html/canvas/WebGLRenderingContext.cpp » ('j') | Source/core/page/Settings.in » ('J')

Powered by Google App Engine
This is Rietveld 408576698