Changeset 95156 in webkit


Ignore:
Timestamp:
Sep 14, 2011 8:04:37 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[chromium] Return correct value for getContextAttributes().preserveDrawingBuffer
https://bugs.webkit.org/show_bug.cgi?id=68082

Patch by John Bauman <jbauman@chromium.org> on 2011-09-14
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:
Location:
trunk/Source/WebKit/chromium
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r95152 r95156  
     12011-09-14  John Bauman  <jbauman@chromium.org>
     2
     3        [chromium] Return correct value for getContextAttributes().preserveDrawingBuffer
     4        https://bugs.webkit.org/show_bug.cgi?id=68082
     5
     6        Reviewed by Kenneth Russell.
     7
     8        WebKit::WebGraphicsContext3D::Attributes doesn't save
     9        preserveDrawingBuffer, so that has to be saving in
     10        GraphicsContext3DPrivate.
     11
     12        * src/GraphicsContext3DChromium.cpp:
     13        (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
     14        (WebCore::GraphicsContext3DPrivate::create):
     15        (WebCore::GraphicsContext3DPrivate::createGraphicsContextFromWebContext):
     16        (WebCore::GraphicsContext3DPrivate::getContextAttributes):
     17        * src/GraphicsContext3DPrivate.h:
     18
    1192011-09-14  Antoine Labour  <piman@chromium.org>
    220
  • trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp

    r94971 r95156  
    8585// GraphicsContext3DPrivate
    8686
    87 GraphicsContext3DPrivate::GraphicsContext3DPrivate(WebKit::WebViewImpl* webViewImpl, PassOwnPtr<WebKit::WebGraphicsContext3D> webContext)
     87GraphicsContext3DPrivate::GraphicsContext3DPrivate(WebKit::WebViewImpl* webViewImpl, PassOwnPtr<WebKit::WebGraphicsContext3D> webContext, GraphicsContext3D::Attributes attrs)
    8888    : m_impl(webContext)
    8989    , m_webViewImpl(webViewImpl)
    9090    , m_initializedAvailableExtensions(false)
    9191    , m_layerComposited(false)
     92    , m_preserveDrawingBuffer(attrs.preserveDrawingBuffer)
    9293    , m_resourceSafety(ResourceSafetyUnknown)
    9394#if USE(SKIA)
     
    115116
    116117
    117 PassOwnPtr<GraphicsContext3DPrivate> GraphicsContext3DPrivate::create(WebKit::WebViewImpl* webViewImpl, PassOwnPtr<WebKit::WebGraphicsContext3D> webContext)
    118 {
    119     return adoptPtr(new GraphicsContext3DPrivate(webViewImpl, webContext));
     118PassOwnPtr<GraphicsContext3DPrivate> GraphicsContext3DPrivate::create(WebKit::WebViewImpl* webViewImpl, PassOwnPtr<WebKit::WebGraphicsContext3D> webContext, GraphicsContext3D::Attributes attrs)
     119{
     120    return adoptPtr(new GraphicsContext3DPrivate(webViewImpl, webContext, attrs));
    120121}
    121122
     
    128129        return 0;
    129130
    130     OwnPtr<GraphicsContext3DPrivate> priv = GraphicsContext3DPrivate::create(webViewImpl, webContext);
     131    OwnPtr<GraphicsContext3DPrivate> priv = GraphicsContext3DPrivate::create(webViewImpl, webContext, attrs);
    131132    if (!priv)
    132133        return 0;
     
    601602    attributes.antialias = webAttributes.antialias;
    602603    attributes.premultipliedAlpha = webAttributes.premultipliedAlpha;
     604    attributes.preserveDrawingBuffer = m_preserveDrawingBuffer;
    603605    return attributes;
    604606}
  • trunk/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h

    r94971 r95156  
    5656class GraphicsContext3DPrivate {
    5757public:
    58     static PassOwnPtr<GraphicsContext3DPrivate> create(WebKit::WebViewImpl*, PassOwnPtr<WebKit::WebGraphicsContext3D>);
     58    static PassOwnPtr<GraphicsContext3DPrivate> create(WebKit::WebViewImpl*, PassOwnPtr<WebKit::WebGraphicsContext3D>, GraphicsContext3D::Attributes);
    5959
    6060    enum ThreadUsage {
     
    7474
    7575    ~GraphicsContext3DPrivate();
    76 
    77     bool initialize(GraphicsContext3D::Attributes, HostWindow*, bool renderDirectlyToHostWindow);
    7876
    7977    // Helper function to provide access to the lower-level WebGraphicsContext3D,
     
    307305
    308306private:
    309     GraphicsContext3DPrivate(WebKit::WebViewImpl*, PassOwnPtr<WebKit::WebGraphicsContext3D>);
     307    GraphicsContext3DPrivate(WebKit::WebViewImpl*, PassOwnPtr<WebKit::WebGraphicsContext3D>, GraphicsContext3D::Attributes);
    310308
    311309    OwnPtr<WebKit::WebGraphicsContext3D> m_impl;
     
    318316    HashSet<String> m_requestableExtensions;
    319317    bool m_layerComposited;
     318    bool m_preserveDrawingBuffer;
    320319
    321320    enum ResourceSafety {
Note: See TracChangeset for help on using the changeset viewer.