Modified: trunk/Source/WebKit/chromium/ChangeLog (95155 => 95156)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-09-15 03:01:22 UTC (rev 95155)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-09-15 03:04:37 UTC (rev 95156)
@@ -1,3 +1,21 @@
+2011-09-14 John Bauman <jbau...@chromium.org>
+
+ [chromium] Return correct value for getContextAttributes().preserveDrawingBuffer
+ https://bugs.webkit.org/show_bug.cgi?id=68082
+
+ Reviewed by Kenneth Russell.
+
+ WebKit::WebGraphicsContext3D::Attributes doesn't save
+ preserveDrawingBuffer, so that has to be saving in
+ GraphicsContext3DPrivate.
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
+ (WebCore::GraphicsContext3DPrivate::create):
+ (WebCore::GraphicsContext3DPrivate::createGraphicsContextFromWebContext):
+ (WebCore::GraphicsContext3DPrivate::getContextAttributes):
+ * src/GraphicsContext3DPrivate.h:
+
2011-09-14 Antoine Labour <pi...@chromium.org>
Remove the dependency on GraphicsLayer from CCLayerTreeHost.
Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp (95155 => 95156)
--- trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp 2011-09-15 03:01:22 UTC (rev 95155)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp 2011-09-15 03:04:37 UTC (rev 95156)
@@ -84,11 +84,12 @@
//----------------------------------------------------------------------
// GraphicsContext3DPrivate
-GraphicsContext3DPrivate::GraphicsContext3DPrivate(WebKit::WebViewImpl* webViewImpl, PassOwnPtr<WebKit::WebGraphicsContext3D> webContext)
+GraphicsContext3DPrivate::GraphicsContext3DPrivate(WebKit::WebViewImpl* webViewImpl, PassOwnPtr<WebKit::WebGraphicsContext3D> webContext, GraphicsContext3D::Attributes attrs)
: m_impl(webContext)
, m_webViewImpl(webViewImpl)
, m_initializedAvailableExtensions(false)
, m_layerComposited(false)
+ , m_preserveDrawingBuffer(attrs.preserveDrawingBuffer)
, m_resourceSafety(ResourceSafetyUnknown)
#if USE(SKIA)
, m_grContext(0)
@@ -114,9 +115,9 @@
}
-PassOwnPtr<GraphicsContext3DPrivate> GraphicsContext3DPrivate::create(WebKit::WebViewImpl* webViewImpl, PassOwnPtr<WebKit::WebGraphicsContext3D> webContext)
+PassOwnPtr<GraphicsContext3DPrivate> GraphicsContext3DPrivate::create(WebKit::WebViewImpl* webViewImpl, PassOwnPtr<WebKit::WebGraphicsContext3D> webContext, GraphicsContext3D::Attributes attrs)
{
- return adoptPtr(new GraphicsContext3DPrivate(webViewImpl, webContext));
+ return adoptPtr(new GraphicsContext3DPrivate(webViewImpl, webContext, attrs));
}
PassRefPtr<GraphicsContext3D> GraphicsContext3DPrivate::createGraphicsContextFromWebContext(PassOwnPtr<WebKit::WebGraphicsContext3D> webContext, GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle, ThreadUsage threadUsage)
@@ -127,7 +128,7 @@
if (threadUsage == ForUseOnThisThread && !webContext->makeContextCurrent())
return 0;
- OwnPtr<GraphicsContext3DPrivate> priv = GraphicsContext3DPrivate::create(webViewImpl, webContext);
+ OwnPtr<GraphicsContext3DPrivate> priv = GraphicsContext3DPrivate::create(webViewImpl, webContext, attrs);
if (!priv)
return 0;
@@ -600,6 +601,7 @@
attributes.stencil = webAttributes.stencil;
attributes.antialias = webAttributes.antialias;
attributes.premultipliedAlpha = webAttributes.premultipliedAlpha;
+ attributes.preserveDrawingBuffer = m_preserveDrawingBuffer;
return attributes;
}
Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h (95155 => 95156)
--- trunk/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h 2011-09-15 03:01:22 UTC (rev 95155)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h 2011-09-15 03:04:37 UTC (rev 95156)
@@ -55,7 +55,7 @@
class GraphicsContext3DPrivate {
public:
- static PassOwnPtr<GraphicsContext3DPrivate> create(WebKit::WebViewImpl*, PassOwnPtr<WebKit::WebGraphicsContext3D>);
+ static PassOwnPtr<GraphicsContext3DPrivate> create(WebKit::WebViewImpl*, PassOwnPtr<WebKit::WebGraphicsContext3D>, GraphicsContext3D::Attributes);
enum ThreadUsage {
ForUseOnThisThread,
@@ -74,8 +74,6 @@
~GraphicsContext3DPrivate();
- bool initialize(GraphicsContext3D::Attributes, HostWindow*, bool renderDirectlyToHostWindow);
-
// Helper function to provide access to the lower-level WebGraphicsContext3D,
// which is needed for subordinate contexts like WebGL's to share resources
// with the compositor's context.
@@ -306,7 +304,7 @@
GC3Denum getGraphicsResetStatusARB();
private:
- GraphicsContext3DPrivate(WebKit::WebViewImpl*, PassOwnPtr<WebKit::WebGraphicsContext3D>);
+ GraphicsContext3DPrivate(WebKit::WebViewImpl*, PassOwnPtr<WebKit::WebGraphicsContext3D>, GraphicsContext3D::Attributes);
OwnPtr<WebKit::WebGraphicsContext3D> m_impl;
OwnPtr<Extensions3DChromium> m_extensions;
@@ -317,6 +315,7 @@
HashSet<String> m_enabledExtensions;
HashSet<String> m_requestableExtensions;
bool m_layerComposited;
+ bool m_preserveDrawingBuffer;
enum ResourceSafety {
ResourceSafetyUnknown,