Changeset 90859 in webkit


Ignore:
Timestamp:
Jul 12, 2011 3:17:19 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r90842.
http://trac.webkit.org/changeset/90842
https://bugs.webkit.org/show_bug.cgi?id=64401

Causes crash in debug on compositing/overflow/content-gains-
scrollbars.html (Requested by jamesr on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-07-12

  • WebCore.gypi:
  • platform/graphics/chromium/ContentLayerChromium.cpp:

(WebCore::ContentLayerChromium::ContentLayerChromium):
(WebCore::ContentLayerChromium::paintContentsIfDirty):
(WebCore::ContentLayerChromium::cleanupResources):
(WebCore::ContentLayerChromium::setLayerRenderer):
(WebCore::ContentLayerChromium::tilingTransform):
(WebCore::ContentLayerChromium::contentBounds):
(WebCore::ContentLayerChromium::updateLayerSize):
(WebCore::ContentLayerChromium::draw):
(WebCore::ContentLayerChromium::drawsContent):
(WebCore::ContentLayerChromium::createTilerIfNeeded):
(WebCore::ContentLayerChromium::updateCompositorResources):
(WebCore::ContentLayerChromium::setTilingOption):
(WebCore::ContentLayerChromium::bindContentsTexture):
(WebCore::ContentLayerChromium::setIsMask):
(WebCore::writeIndent):
(WebCore::ContentLayerChromium::dumpLayerProperties):

  • platform/graphics/chromium/ContentLayerChromium.h:
  • platform/graphics/chromium/ImageLayerChromium.cpp:

(WebCore::ImageLayerChromium::ImageLayerChromium):
(WebCore::ImageLayerChromium::paintContentsIfDirty):
(WebCore::ImageLayerChromium::updateCompositorResources):
(WebCore::ImageLayerChromium::contentBounds):

  • platform/graphics/chromium/ImageLayerChromium.h:

(WebCore::ImageLayerChromium::drawsContent):

  • platform/graphics/chromium/LayerChromium.cpp:

(WebCore::LayerChromium::pushPropertiesTo):
(WebCore::LayerChromium::ccLayerImpl):

  • platform/graphics/chromium/LayerChromium.h:

(WebCore::LayerChromium::draw):

  • platform/graphics/chromium/LayerRendererChromium.cpp:

(WebCore::LayerRendererChromium::drawRootLayer):

  • platform/graphics/chromium/LayerTilerChromium.cpp:

(WebCore::LayerTilerChromium::updateRect):
(WebCore::LayerTilerChromium::draw):
(WebCore::LayerTilerChromium::drawTiles):

  • platform/graphics/chromium/LayerTilerChromium.h:
  • platform/graphics/chromium/TiledLayerChromium.cpp: Removed.
  • platform/graphics/chromium/TiledLayerChromium.h: Removed.
  • platform/graphics/chromium/cc/CCLayerImpl.cpp:

(WebCore::CCLayerImpl::drawsContent):
(WebCore::CCLayerImpl::draw):

  • platform/graphics/chromium/cc/CCLayerImpl.h:
  • platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Removed.
  • platform/graphics/chromium/cc/CCTiledLayerImpl.h: Removed.
Location:
trunk/Source/WebCore
Files:
4 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r90856 r90859  
     12011-07-12  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r90842.
     4        http://trac.webkit.org/changeset/90842
     5        https://bugs.webkit.org/show_bug.cgi?id=64401
     6
     7        Causes crash in debug on compositing/overflow/content-gains-
     8        scrollbars.html (Requested by jamesr on #webkit).
     9
     10        * WebCore.gypi:
     11        * platform/graphics/chromium/ContentLayerChromium.cpp:
     12        (WebCore::ContentLayerChromium::ContentLayerChromium):
     13        (WebCore::ContentLayerChromium::paintContentsIfDirty):
     14        (WebCore::ContentLayerChromium::cleanupResources):
     15        (WebCore::ContentLayerChromium::setLayerRenderer):
     16        (WebCore::ContentLayerChromium::tilingTransform):
     17        (WebCore::ContentLayerChromium::contentBounds):
     18        (WebCore::ContentLayerChromium::updateLayerSize):
     19        (WebCore::ContentLayerChromium::draw):
     20        (WebCore::ContentLayerChromium::drawsContent):
     21        (WebCore::ContentLayerChromium::createTilerIfNeeded):
     22        (WebCore::ContentLayerChromium::updateCompositorResources):
     23        (WebCore::ContentLayerChromium::setTilingOption):
     24        (WebCore::ContentLayerChromium::bindContentsTexture):
     25        (WebCore::ContentLayerChromium::setIsMask):
     26        (WebCore::writeIndent):
     27        (WebCore::ContentLayerChromium::dumpLayerProperties):
     28        * platform/graphics/chromium/ContentLayerChromium.h:
     29        * platform/graphics/chromium/ImageLayerChromium.cpp:
     30        (WebCore::ImageLayerChromium::ImageLayerChromium):
     31        (WebCore::ImageLayerChromium::paintContentsIfDirty):
     32        (WebCore::ImageLayerChromium::updateCompositorResources):
     33        (WebCore::ImageLayerChromium::contentBounds):
     34        * platform/graphics/chromium/ImageLayerChromium.h:
     35        (WebCore::ImageLayerChromium::drawsContent):
     36        * platform/graphics/chromium/LayerChromium.cpp:
     37        (WebCore::LayerChromium::pushPropertiesTo):
     38        (WebCore::LayerChromium::ccLayerImpl):
     39        * platform/graphics/chromium/LayerChromium.h:
     40        (WebCore::LayerChromium::draw):
     41        * platform/graphics/chromium/LayerRendererChromium.cpp:
     42        (WebCore::LayerRendererChromium::drawRootLayer):
     43        * platform/graphics/chromium/LayerTilerChromium.cpp:
     44        (WebCore::LayerTilerChromium::updateRect):
     45        (WebCore::LayerTilerChromium::draw):
     46        (WebCore::LayerTilerChromium::drawTiles):
     47        * platform/graphics/chromium/LayerTilerChromium.h:
     48        * platform/graphics/chromium/TiledLayerChromium.cpp: Removed.
     49        * platform/graphics/chromium/TiledLayerChromium.h: Removed.
     50        * platform/graphics/chromium/cc/CCLayerImpl.cpp:
     51        (WebCore::CCLayerImpl::drawsContent):
     52        (WebCore::CCLayerImpl::draw):
     53        * platform/graphics/chromium/cc/CCLayerImpl.h:
     54        * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Removed.
     55        * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Removed.
     56
    1572011-07-12  Joseph Pecoraro  <joepeck@webkit.org>
    258
  • trunk/Source/WebCore/WebCore.gypi

    r90849 r90859  
    41414141            'platform/graphics/chromium/TextureManager.cpp',
    41424142            'platform/graphics/chromium/TextureManager.h',
    4143             'platform/graphics/chromium/TiledLayerChromium.cpp',
    4144             'platform/graphics/chromium/TiledLayerChromium.h',
    41454143            'platform/graphics/chromium/TransparencyWin.cpp',
    41464144            'platform/graphics/chromium/TransparencyWin.h',
     
    41844182            'platform/graphics/chromium/cc/CCThread.h',
    41854183            'platform/graphics/chromium/cc/CCThreadTask.h',
    4186             'platform/graphics/chromium/cc/CCTiledLayerImpl.cpp',
    4187             'platform/graphics/chromium/cc/CCTiledLayerImpl.h',
    41884184            'platform/graphics/chromium/cc/CCVideoLayerImpl.cpp',
    41894185            'platform/graphics/chromium/cc/CCVideoLayerImpl.h',
  • trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp

    r90842 r90859  
    3535#include "ContentLayerChromium.h"
    3636
     37#include "cc/CCLayerImpl.h"
     38#include "GraphicsContext3D.h"
    3739#include "LayerPainterChromium.h"
    3840#include "LayerRendererChromium.h"
     41#include "LayerTexture.h"
    3942#include "LayerTextureUpdaterCanvas.h"
     43#include "LayerTilerChromium.h"
    4044#include "PlatformBridge.h"
     45#include "RenderLayerBacking.h"
     46#include "TextStream.h"
    4147#include <wtf/CurrentTime.h>
     48
     49// Start tiling when the width and height of a layer are larger than this size.
     50static int maxUntiledSize = 510;
     51
     52// When tiling is enabled, use tiles of this dimension squared.
     53static int defaultTileSize = 256;
     54
     55using namespace std;
    4256
    4357namespace WebCore {
     
    7791
    7892ContentLayerChromium::ContentLayerChromium(GraphicsLayerChromium* owner)
    79     : TiledLayerChromium(owner)
     93    : LayerChromium(owner)
     94    , m_tilingOption(ContentLayerChromium::AutoTile)
     95    , m_borderTexels(true)
    8096{
    8197}
     
    91107    ASSERT(layerRenderer());
    92108
    93     updateTileSizeAndTilingOption();
     109    updateLayerSize();
    94110
    95111    const IntRect& layerRect = visibleLayerRect();
     
    104120        return;
    105121
    106     m_tiler->prepareToUpdate(layerRect, textureUpdater());
     122    m_tiler->prepareToUpdate(layerRect, m_textureUpdater.get());
    107123    m_dirtyRect = FloatRect();
    108124}
    109125
    110 bool ContentLayerChromium::drawsContent() const
    111 {
    112     return m_owner && m_owner->drawsContent() && TiledLayerChromium::drawsContent();
     126void ContentLayerChromium::cleanupResources()
     127{
     128    m_textureUpdater.clear();
     129    m_tiler.clear();
     130    LayerChromium::cleanupResources();
     131}
     132
     133void ContentLayerChromium::setLayerRenderer(LayerRendererChromium* layerRenderer)
     134{
     135    LayerChromium::setLayerRenderer(layerRenderer);
     136    createTilerIfNeeded();
    113137}
    114138
     
    126150}
    127151
     152TransformationMatrix ContentLayerChromium::tilingTransform()
     153{
     154    TransformationMatrix transform = ccLayerImpl()->drawTransform();
     155
     156    if (contentBounds().isEmpty())
     157        return transform;
     158
     159    transform.scaleNonUniform(bounds().width() / static_cast<double>(contentBounds().width()),
     160                              bounds().height() / static_cast<double>(contentBounds().height()));
     161
     162    // Tiler draws with a different origin from other layers.
     163    transform.translate(-contentBounds().width() / 2.0, -contentBounds().height() / 2.0);
     164
     165    return transform;
     166}
     167
     168IntSize ContentLayerChromium::contentBounds() const
     169{
     170    return bounds();
     171}
     172
     173void ContentLayerChromium::updateLayerSize()
     174{
     175    if (!m_tiler)
     176        return;
     177
     178    const IntSize tileSize(defaultTileSize, defaultTileSize);
     179
     180    // Tile if both dimensions large, or any one dimension large and the other
     181    // extends into a second tile. This heuristic allows for long skinny layers
     182    // (e.g. scrollbars) that are Nx1 tiles to minimize wasted texture space.
     183    const bool anyDimensionLarge = contentBounds().width() > maxUntiledSize || contentBounds().height() > maxUntiledSize;
     184    const bool anyDimensionOneTile = contentBounds().width() <= defaultTileSize || contentBounds().height() <= defaultTileSize;
     185    const bool autoTiled = anyDimensionLarge && !anyDimensionOneTile;
     186
     187    bool isTiled;
     188    if (m_tilingOption == AlwaysTile)
     189        isTiled = true;
     190    else if (m_tilingOption == NeverTile)
     191        isTiled = false;
     192    else
     193        isTiled = autoTiled;
     194
     195    // Empty tile size tells the tiler to avoid tiling.
     196    IntSize requestedSize = isTiled ? tileSize : IntSize();
     197    const int maxSize = layerRenderer()->maxTextureSize();
     198    IntSize clampedSize = requestedSize.shrunkTo(IntSize(maxSize, maxSize));
     199    m_tiler->setTileSize(clampedSize);
     200}
     201
     202void ContentLayerChromium::draw()
     203{
     204    const IntRect& layerRect = visibleLayerRect();
     205    if (!layerRect.isEmpty())
     206        m_tiler->draw(layerRect, tilingTransform(), ccLayerImpl()->drawOpacity(), m_textureUpdater.get());
     207}
     208
     209bool ContentLayerChromium::drawsContent() const
     210{
     211    if (!m_owner || !m_owner->drawsContent())
     212        return false;
     213
     214    if (!m_tiler)
     215        return true;
     216
     217    if (m_tilingOption == NeverTile && m_tiler->numTiles() > 1)
     218        return false;
     219
     220    return !m_tiler->skipsDraw();
     221}
     222
     223void ContentLayerChromium::createTilerIfNeeded()
     224{
     225    if (m_tiler)
     226        return;
     227
     228    createTextureUpdaterIfNeeded();
     229
     230    m_tiler = LayerTilerChromium::create(
     231        layerRenderer(),
     232        IntSize(defaultTileSize, defaultTileSize),
     233        m_borderTexels ? LayerTilerChromium::HasBorderTexels :
     234        LayerTilerChromium::NoBorderTexels);
     235}
     236
     237void ContentLayerChromium::updateCompositorResources()
     238{
     239    m_tiler->updateRect(m_textureUpdater.get());
     240}
     241
     242void ContentLayerChromium::setTilingOption(TilingOption option)
     243{
     244    m_tilingOption = option;
     245    updateLayerSize();
     246}
     247
     248void ContentLayerChromium::bindContentsTexture()
     249{
     250    // This function is only valid for single texture layers, e.g. masks.
     251    ASSERT(m_tilingOption == NeverTile);
     252    ASSERT(m_tiler);
     253
     254    LayerTexture* texture = m_tiler->getSingleTexture();
     255    ASSERT(texture);
     256
     257    texture->bindTexture();
     258}
     259
     260void ContentLayerChromium::setIsMask(bool isMask)
     261{
     262    m_borderTexels = false;
     263    setTilingOption(isMask ? NeverTile : AutoTile);
     264}
     265
     266static void writeIndent(TextStream& ts, int indent)
     267{
     268    for (int i = 0; i != indent; ++i)
     269        ts << "  ";
     270}
     271
     272void ContentLayerChromium::dumpLayerProperties(TextStream& ts, int indent) const
     273{
     274    LayerChromium::dumpLayerProperties(ts, indent);
     275    writeIndent(ts, indent);
     276    ts << "skipsDraw: " << (!m_tiler || m_tiler->skipsDraw()) << "\n";
     277}
     278
    128279}
    129280#endif // USE(ACCELERATED_COMPOSITING)
  • trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h

    r90842 r90859  
    3535#if USE(ACCELERATED_COMPOSITING)
    3636
    37 #include "TiledLayerChromium.h"
    38 #include "cc/CCTiledLayerImpl.h"
     37#include "LayerChromium.h"
    3938
    4039namespace WebCore {
     
    4544
    4645// A Layer that requires a GraphicsContext to render its contents.
    47 class ContentLayerChromium : public TiledLayerChromium {
     46class ContentLayerChromium : public LayerChromium {
     47    friend class LayerRendererChromium;
    4848public:
     49    enum TilingOption { AlwaysTile, NeverTile, AutoTile };
     50
    4951    static PassRefPtr<ContentLayerChromium> create(GraphicsLayerChromium* owner = 0);
    5052
     
    5254
    5355    virtual void paintContentsIfDirty();
     56    virtual void updateCompositorResources();
     57    virtual void setIsMask(bool);
     58    virtual void bindContentsTexture();
    5459
    55 private:
     60    virtual void draw();
     61    virtual bool drawsContent() const;
     62
     63protected:
    5664    explicit ContentLayerChromium(GraphicsLayerChromium* owner);
    5765
    5866    virtual const char* layerTypeAsString() const { return "ContentLayer"; }
     67    virtual void dumpLayerProperties(TextStream&, int indent) const;
    5968
    60     virtual bool drawsContent() const;
     69    virtual void cleanupResources();
     70    virtual void setLayerRenderer(LayerRendererChromium*);
     71
     72    virtual IntSize contentBounds() const;
     73
     74    TransformationMatrix tilingTransform();
     75
     76    void updateLayerSize();
     77    void createTilerIfNeeded();
    6178    virtual void createTextureUpdaterIfNeeded();
    62     virtual LayerTextureUpdater* textureUpdater() const { return m_textureUpdater.get(); }
     79    void setTilingOption(TilingOption);
    6380
    6481    OwnPtr<LayerTextureUpdater> m_textureUpdater;
     82    OwnPtr<LayerTilerChromium> m_tiler;
     83    TilingOption m_tilingOption;
     84    bool m_borderTexels;
    6585};
    6686
  • trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp

    r90842 r90859  
    116116
    117117ImageLayerChromium::ImageLayerChromium(GraphicsLayerChromium* owner)
    118     : TiledLayerChromium(owner)
     118    : ContentLayerChromium(owner)
    119119    , m_imageForCurrentFrame(0)
     120    , m_contents(0)
    120121{
    121122}
     
    123124ImageLayerChromium::~ImageLayerChromium()
    124125{
    125 }
    126 
    127 void ImageLayerChromium::cleanupResources()
    128 {
    129     m_textureUpdater.clear();
    130     TiledLayerChromium::cleanupResources();
    131126}
    132127
     
    151146
    152147    if (!m_dirtyRect.isEmpty()) {
    153         m_textureUpdater->updateFromImage(m_contents->nativeImageForCurrentFrame());
    154         updateTileSizeAndTilingOption();
     148        // FIXME: This downcast is bad. The fix is to make ImageLayerChromium not derive from ContentLayerChromium.
     149        ImageLayerTextureUpdater* imageTextureUpdater = static_cast<ImageLayerTextureUpdater*>(m_textureUpdater.get());
     150        imageTextureUpdater->updateFromImage(m_contents->nativeImageForCurrentFrame());
     151        updateLayerSize();
    155152        IntRect paintRect(IntPoint(), contentBounds());
    156153        if (!m_dirtyRect.isEmpty()) {
     
    160157    }
    161158
    162     if (visibleLayerRect().isEmpty())
    163         return;
    164 
    165159    m_tiler->prepareToUpdate(visibleLayerRect(), m_textureUpdater.get());
    166160}
    167161
    168 LayerTextureUpdater* ImageLayerChromium::textureUpdater() const
     162void ImageLayerChromium::updateCompositorResources()
    169163{
    170     return m_textureUpdater.get();
    171 }
    172 
    173 IntSize ImageLayerChromium::contentBounds() const
    174 {
    175     if (!m_contents)
    176         return IntSize();
    177     return m_contents->size();
    178 }
    179 
    180 bool ImageLayerChromium::drawsContent() const
    181 {
    182     return m_contents && TiledLayerChromium::drawsContent();
     164    m_tiler->updateRect(m_textureUpdater.get());
    183165}
    184166
     
    189171}
    190172
     173IntSize ImageLayerChromium::contentBounds() const
     174{
     175    return m_contents->size();
     176}
     177
    191178}
    192179#endif // USE(ACCELERATED_COMPOSITING)
  • trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.h

    r90842 r90859  
    4545
    4646class Image;
    47 class ImageLayerTextureUpdater;
    4847
    4948// A Layer that contains only an Image element.
    50 class ImageLayerChromium : public TiledLayerChromium {
     49class ImageLayerChromium : public ContentLayerChromium {
    5150public:
    5251    static PassRefPtr<ImageLayerChromium> create(GraphicsLayerChromium* owner = 0);
    5352    virtual ~ImageLayerChromium();
    5453
    55     virtual bool drawsContent() const;
    5654    virtual void paintContentsIfDirty();
     55    virtual void updateCompositorResources();
     56    virtual bool drawsContent() const { return m_contents; }
    5757
    5858    void setContents(Image* image);
     
    6161    virtual const char* layerTypeAsString() const { return "ImageLayer"; }
    6262
     63    virtual IntSize contentBounds() const;
     64
    6365private:
    6466    ImageLayerChromium(GraphicsLayerChromium* owner);
    6567
    66     virtual void cleanupResources();
    6768    virtual void createTextureUpdaterIfNeeded();
    68     void setTilingOption(TilingOption);
    69 
    70     virtual LayerTextureUpdater* textureUpdater() const;
    71     virtual IntSize contentBounds() const;
    7269
    7370    NativeImagePtr m_imageForCurrentFrame;
    7471    RefPtr<Image> m_contents;
    75 
    76     OwnPtr<ImageLayerTextureUpdater> m_textureUpdater;
    7772};
    7873
  • trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp

    r90842 r90859  
    296296    layer->setDebugBorderWidth(m_debugBorderWidth);
    297297    layer->setDoubleSided(m_doubleSided);
    298     layer->setDrawsContent(drawsContent());
    299298    layer->setLayerRenderer(m_layerRenderer.get());
    300299    layer->setMasksToBounds(m_masksToBounds);
     
    385384}
    386385
    387 CCLayerImpl* LayerChromium::ccLayerImpl() const
     386CCLayerImpl* LayerChromium::ccLayerImpl()
    388387{
    389388    return m_ccLayerImpl;
  • trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h

    r90842 r90859  
    162162    virtual void unreserveContentsTexture() { }
    163163    virtual void bindContentsTexture() { }
     164    virtual void draw() { }
    164165
    165166    // These exists just for debugging (via drawDebugBorder()).
     
    172173
    173174    // Everything from here down in the public section will move to CCLayerImpl.
    174     CCLayerImpl* ccLayerImpl() const;
     175    CCLayerImpl* ccLayerImpl();
    175176
    176177    static void drawTexturedQuad(GraphicsContext3D*, const TransformationMatrix& projectionMatrix, const TransformationMatrix& layerMatrix,
  • trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp

    r90850 r90859  
    228228    scroll.translate(-m_viewportVisibleRect.x(), -m_viewportVisibleRect.y());
    229229
    230     m_rootLayerContentTiler->draw(m_viewportVisibleRect, scroll, 1.0f);
     230    m_rootLayerContentTiler->draw(m_viewportVisibleRect, scroll, 1.0f, m_rootLayerTextureUpdater.get());
    231231}
    232232
  • trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp

    r90842 r90859  
    327327
    328328    GraphicsContext3D* context = layerRendererContext();
    329     m_textureOrientation = textureUpdater->orientation();
    330     m_sampledTexelFormat = textureUpdater->sampledTexelFormat(m_textureFormat);
    331329
    332330    int left, top, right, bottom;
     
    388386}
    389387
    390 void LayerTilerChromium::draw(const IntRect& contentRect, const TransformationMatrix& globalTransform, float opacity)
     388void LayerTilerChromium::draw(const IntRect& contentRect, const TransformationMatrix& globalTransform, float opacity, LayerTextureUpdater* textureUpdater)
    391389{
    392390    if (m_skipsDraw || !m_tiles.size() || contentRect.isEmpty())
    393391        return;
    394392
    395     switch (m_sampledTexelFormat) {
     393    switch (textureUpdater->sampledTexelFormat(m_textureFormat)) {
    396394    case LayerTextureUpdater::SampledTexelFormatRGBA:
    397         drawTiles(contentRect, globalTransform, opacity, layerRenderer()->tilerProgram());
     395        drawTiles(contentRect, globalTransform, opacity, layerRenderer()->tilerProgram(), textureUpdater);
    398396        break;
    399397    case LayerTextureUpdater::SampledTexelFormatBGRA:
    400         drawTiles(contentRect, globalTransform, opacity, layerRenderer()->tilerProgramSwizzle());
     398        drawTiles(contentRect, globalTransform, opacity, layerRenderer()->tilerProgramSwizzle(), textureUpdater);
    401399        break;
    402400    default:
     
    456454
    457455template <class T>
    458 void LayerTilerChromium::drawTiles(const IntRect& contentRect, const TransformationMatrix& globalTransform, float opacity, const T* program)
     456void LayerTilerChromium::drawTiles(const IntRect& contentRect, const TransformationMatrix& globalTransform, float opacity, const T* program, LayerTextureUpdater* textureUpdater)
    459457{
    460458    GraphicsContext3D* context = layerRendererContext();
     
    550548            // OpenGL coordinate system is bottom-up.
    551549            // If tile texture is top-down, we need to flip the texture coordinates.
    552             if (m_textureOrientation == LayerTextureUpdater::TopDownOrientation) {
     550            if (textureUpdater->orientation() == LayerTextureUpdater::TopDownOrientation) {
    553551                texTranslateY = 1.0 - texTranslateY;
    554552                texScaleY *= -1.0;
  • trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h

    r90842 r90859  
    3232#include "LayerChromium.h"
    3333#include "LayerTexture.h"
    34 #include "LayerTextureUpdater.h"
    3534#include "TilingData.h"
    3635#include <wtf/HashTraits.h>
     
    6160    void updateRect(LayerTextureUpdater*);
    6261    // Draw all tiles that intersect with the content rect.
    63     void draw(const IntRect& contentRect, const TransformationMatrix&, float opacity);
     62    void draw(const IntRect& contentRect, const TransformationMatrix&, float opacity, LayerTextureUpdater*);
    6463
    6564    int numTiles() const { return m_tilingData.numTiles(); }
     
    111110    // Draw all tiles that intersect with contentRect.
    112111    template <class T>
    113     void drawTiles(const IntRect& contentRect, const TransformationMatrix&, float opacity, const T* program);
     112    void drawTiles(const IntRect& contentRect, const TransformationMatrix&, float opacity, const T* program, LayerTextureUpdater*);
    114113
    115114    template <class T>
     
    167166    IntRect m_updateRect;
    168167
    169     LayerTextureUpdater::Orientation m_textureOrientation;
    170     LayerTextureUpdater::SampledTexelFormat m_sampledTexelFormat;
    171168    TilingData m_tilingData;
    172169
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp

    r90842 r90859  
    137137}
    138138
     139// These belong on CCLayerImpl, but should be overridden by each type and not defer to the LayerChromium subtypes.
     140bool CCLayerImpl::drawsContent() const
     141{
     142    return m_owner->drawsContent();
     143}
     144
    139145void CCLayerImpl::draw()
    140146{
    141     ASSERT_NOT_REACHED();
     147    return m_owner->draw();
    142148}
    143149
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h

    r90842 r90859  
    7373    virtual void updateCompositorResources();
    7474    void unreserveContentsTexture();
    75     virtual void bindContentsTexture();
     75    void bindContentsTexture();
    7676
    7777    // Returns true if this layer has content to draw.
    78     void setDrawsContent(bool drawsContent) { m_drawsContent = drawsContent; }
    79     bool drawsContent() const { return m_drawsContent; }
     78    virtual bool drawsContent() const;
    8079
    8180    // Returns true if any of the layer's descendants has content to draw.
     
    203202    bool m_usesLayerScissor;
    204203
    205     bool m_drawsContent;
    206 
    207204    // Properties owned exclusively by this CCLayerImpl.
    208205    // Debugging.
Note: See TracChangeset for help on using the changeset viewer.