Changeset 62874 in webkit


Ignore:
Timestamp:
Jul 8, 2010 5:41:00 PM (14 years ago)
Author:
jamesr@google.com
Message:

2010-07-08 James Robinson <jamesr@google.com>

Reviewed by Darin Fisher.

Allow resizing and getting the texture ID from an offscreen GLES2Context
https://bugs.webkit.org/show_bug.cgi?id=41828

When using an offscreen GLES2Context the caller needs to be able to resize the backing store
managed by the embedder and get access to a texture id to pass to the compositor. WebGL
does these actions in an indirect way, it will be refactored to use this path.

  • public/WebGLES2Context.h:
  • src/GLES2Context.cpp: (WebCore::GLES2Context::resizeOffscreenContent): (WebCore::GLES2Context::getOffscreenContentParentTextureId):

2010-07-08 James Robinson <jamesr@google.com>

Reviewed by Darin Fisher.

Allow resizing and getting the texture id from an offscreen GLES2Context
https://bugs.webkit.org/show_bug.cgi?id=41828

When using an offscreen GLES2Context the caller needs to be able to resize the backing store
managed by the embedder and get access to a texture id to pass to the compositor. WebGL
does these actions in an indirect way, it will be refactored to use this path.

  • platform/chromium/GLES2Context.h:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r62873 r62874  
     12010-07-08  James Robinson  <jamesr@google.com>
     2
     3        Reviewed by Darin Fisher.
     4
     5        Allow resizing and getting the texture id from an offscreen GLES2Context
     6        https://bugs.webkit.org/show_bug.cgi?id=41828
     7
     8        When using an offscreen GLES2Context the caller needs to be able to resize the backing store
     9        managed by the embedder and get access to a texture id to pass to the compositor.  WebGL
     10        does these actions in an indirect way, it will be refactored to use this path.
     11
     12        * platform/chromium/GLES2Context.h:
     13
    1142010-07-02  Ojan Vafai  <ojan@chromium.org>
    215
  • trunk/WebCore/platform/chromium/GLES2Context.h

    r62702 r62874  
    3939
    4040class GLES2ContextInternal;
     41class IntSize;
    4142class Page;
    4243
     
    5758    bool swapBuffers();
    5859
     60    // Only valid for offscreen contexts.
     61    void resizeOffscreenContent(const IntSize&);
     62
     63    // Returns the ID of the texture used for offscreen rendering in the context of the parent.
     64    // This texture is accessible by the GPU page compositor.
     65    unsigned getOffscreenContentParentTextureId();
     66
    5967private:
    6068    friend class GLES2ContextInternal;
  • trunk/WebKit/chromium/ChangeLog

    r62831 r62874  
     12010-07-08  James Robinson  <jamesr@google.com>
     2
     3        Reviewed by Darin Fisher.
     4
     5        Allow resizing and getting the texture ID from an offscreen GLES2Context
     6        https://bugs.webkit.org/show_bug.cgi?id=41828
     7
     8        When using an offscreen GLES2Context the caller needs to be able to resize the backing store
     9        managed by the embedder and get access to a texture id to pass to the compositor.  WebGL
     10        does these actions in an indirect way, it will be refactored to use this path.
     11
     12        * public/WebGLES2Context.h:
     13        * src/GLES2Context.cpp:
     14        (WebCore::GLES2Context::resizeOffscreenContent):
     15        (WebCore::GLES2Context::getOffscreenContentParentTextureId):
     16
    1172010-07-08  Vitaly Repeshko  <vitalyr@chromium.org>
    218
  • trunk/WebKit/chromium/public/WebGLES2Context.h

    r61774 r62874  
    3737namespace WebKit {
    3838
     39class WebSize;
    3940class WebView;
    4041
     
    5051    virtual bool destroy() = 0;
    5152    virtual bool swapBuffers() = 0;
     53
     54    // The follow two functions are for managing a context that renders offscreen.
     55
     56    // Resizes the backing store used for offscreen rendering.
     57    virtual void resizeOffscreenContent(const WebSize&) = 0;
     58
     59    // Returns the ID of the texture used for offscreen rendering in the context of the parent.
     60    virtual unsigned getOffscreenContentParentTextureId() = 0;
    5261};
    5362
  • trunk/WebKit/chromium/src/GLES2Context.cpp

    r62702 r62874  
    3232
    3333#include "GLES2Context.h"
     34#include "IntSize.h"
    3435#include "WebGLES2Context.h"
    3536#include "WebKit.h"
     
    142143}
    143144
     145void GLES2Context::resizeOffscreenContent(const IntSize& size)
     146{
     147    WebGLES2Context* webContext = m_internal->getWebGLES2Context();
     148    ASSERT(webContext);
     149    webContext->resizeOffscreenContent(size);
     150}
     151
     152unsigned GLES2Context::getOffscreenContentParentTextureId()
     153{
     154    WebGLES2Context* webContext = m_internal->getWebGLES2Context();
     155    ASSERT(webContext);
     156    return webContext->getOffscreenContentParentTextureId();
     157}
     158
    144159}  // namespace WebCore
Note: See TracChangeset for help on using the changeset viewer.