Changeset 93438 in webkit


Ignore:
Timestamp:
Aug 19, 2011 2:24:17 PM (13 years ago)
Author:
enne@google.com
Message:

[chromium] Refactor updateCompositorResources to take an explicit GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=66432

Reviewed by James Robinson.

Covered by existing tests.

  • platform/graphics/chromium/Canvas2DLayerChromium.cpp:

(WebCore::Canvas2DLayerChromium::updateCompositorResources):

  • platform/graphics/chromium/Canvas2DLayerChromium.h:
  • platform/graphics/chromium/LayerChromium.h:

(WebCore::LayerChromium::updateCompositorResources):

  • platform/graphics/chromium/LayerRendererChromium.cpp:

(WebCore::LayerRendererChromium::updateCompositorResources):

  • platform/graphics/chromium/TiledLayerChromium.cpp:

(WebCore::TiledLayerChromium::updateCompositorResources):

  • platform/graphics/chromium/TiledLayerChromium.h:
  • platform/graphics/chromium/VideoLayerChromium.cpp:

(WebCore::VideoLayerChromium::updateCompositorResources):

  • platform/graphics/chromium/VideoLayerChromium.h:
  • platform/graphics/chromium/WebGLLayerChromium.cpp:

(WebCore::WebGLLayerChromium::updateCompositorResources):

  • platform/graphics/chromium/WebGLLayerChromium.h:
Location:
trunk/Source/WebCore
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r93437 r93438  
     12011-08-18  Adrienne Walker  <enne@google.com>
     2
     3        [chromium] Refactor updateCompositorResources to take an explicit GraphicsContext3D
     4        https://bugs.webkit.org/show_bug.cgi?id=66432
     5
     6        Reviewed by James Robinson.
     7
     8        Covered by existing tests.
     9
     10        * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
     11        (WebCore::Canvas2DLayerChromium::updateCompositorResources):
     12        * platform/graphics/chromium/Canvas2DLayerChromium.h:
     13        * platform/graphics/chromium/LayerChromium.h:
     14        (WebCore::LayerChromium::updateCompositorResources):
     15        * platform/graphics/chromium/LayerRendererChromium.cpp:
     16        (WebCore::LayerRendererChromium::updateCompositorResources):
     17        * platform/graphics/chromium/TiledLayerChromium.cpp:
     18        (WebCore::TiledLayerChromium::updateCompositorResources):
     19        * platform/graphics/chromium/TiledLayerChromium.h:
     20        * platform/graphics/chromium/VideoLayerChromium.cpp:
     21        (WebCore::VideoLayerChromium::updateCompositorResources):
     22        * platform/graphics/chromium/VideoLayerChromium.h:
     23        * platform/graphics/chromium/WebGLLayerChromium.cpp:
     24        (WebCore::WebGLLayerChromium::updateCompositorResources):
     25        * platform/graphics/chromium/WebGLLayerChromium.h:
     26
    1272011-08-19  Victoria Kirst  <vrk@chromium.org>
    228
  • trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp

    r92520 r93438  
    6767}
    6868
    69 void Canvas2DLayerChromium::updateCompositorResources()
     69void Canvas2DLayerChromium::updateCompositorResources(GraphicsContext3D*)
    7070{
    7171    if (!m_contentsDirty || !drawsContent())
  • trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.h

    r92520 r93438  
    4747    virtual ~Canvas2DLayerChromium();
    4848    virtual bool drawsContent() const;
    49     virtual void updateCompositorResources();
     49    virtual void updateCompositorResources(GraphicsContext3D*);
    5050
    5151    void setTextureChanged();
  • trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h

    r93387 r93438  
    167167    virtual bool drawsContent() const { return false; }
    168168    virtual void paintContentsIfDirty() { }
    169     virtual void updateCompositorResources() { }
     169    virtual void updateCompositorResources(GraphicsContext3D*) { }
    170170    virtual void setIsMask(bool) {}
    171171    virtual void unreserveContentsTexture() { }
  • trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp

    r93424 r93438  
    952952
    953953    if (layer->drawsContent())
    954         layer->updateCompositorResources();
     954        layer->updateCompositorResources(context());
    955955}
    956956
  • trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp

    r93424 r93438  
    157157}
    158158
    159 void TiledLayerChromium::updateCompositorResources()
     159void TiledLayerChromium::updateCompositorResources(GraphicsContext3D* context)
    160160{
    161161    // Painting could cause compositing to get turned off, which may cause the tiler to become invalidated mid-update.
     
    163163        return;
    164164
    165     GraphicsContext3D* context = layerRenderer()->context();
    166165    int left, top, right, bottom;
    167166    m_tiler->contentRectToTileIndices(m_updateRect, left, top, right, bottom);
  • trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h

    r93424 r93438  
    4444    virtual ~TiledLayerChromium();
    4545
    46     virtual void updateCompositorResources();
     46    virtual void updateCompositorResources(GraphicsContext3D*);
    4747    virtual void setIsMask(bool);
    4848
  • trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp

    r92245 r93438  
    9595}
    9696
    97 void VideoLayerChromium::updateCompositorResources()
     97void VideoLayerChromium::updateCompositorResources(GraphicsContext3D* context)
    9898{
    9999    if (!m_contentsDirty || !m_owner)
     
    126126    // Allocate textures for planes if they are not allocated already, or
    127127    // reallocate textures that are the wrong size for the frame.
    128     GraphicsContext3D* context = layerRendererContext();
    129128    bool texturesAllocated = allocateTexturesIfNeeded(context, frame, textureFormat);
    130129    if (!texturesAllocated) {
  • trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.h

    r91584 r93438  
    5757    virtual PassRefPtr<CCLayerImpl> createCCLayerImpl();
    5858
    59     virtual void updateCompositorResources();
     59    virtual void updateCompositorResources(GraphicsContext3D*);
    6060    virtual bool drawsContent() const { return true; }
    6161
  • trunk/Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp

    r93335 r93438  
    6969}
    7070
    71 void WebGLLayerChromium::updateCompositorResources()
     71void WebGLLayerChromium::updateCompositorResources(GraphicsContext3D* rendererContext)
    7272{
    7373    if (!drawsContent())
     
    7777        return;
    7878
    79     GraphicsContext3D* rendererContext = layerRendererContext();
    8079    if (m_textureChanged) {
    8180        rendererContext->bindTexture(GraphicsContext3D::TEXTURE_2D, m_textureId);
  • trunk/Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.h

    r92908 r93438  
    5151
    5252    virtual bool drawsContent() const;
    53     virtual void updateCompositorResources();
     53    virtual void updateCompositorResources(GraphicsContext3D*);
    5454    void setTextureUpdated();
    5555    bool paintRenderedResultsToCanvas(ImageBuffer*);
Note: See TracChangeset for help on using the changeset viewer.