Changeset 87167 in webkit


Ignore:
Timestamp:
May 24, 2011 10:41:33 AM (13 years ago)
Author:
alokp@chromium.org
Message:

2011-05-24 Alok Priyadarshi <alokp@chromium.org>

Reviewed by James Robinson.

Enable skia gpu rendering for content layers
https://bugs.webkit.org/show_bug.cgi?id=56749

  • src/WebViewImpl.cpp: (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): (WebKit::WebViewImpl::reallocateRenderer):

2011-05-24 Alok Priyadarshi <alokp@chromium.org>

Reviewed by James Robinson.

Enable skia gpu rendering for content layers
https://bugs.webkit.org/show_bug.cgi?id=56749

This patch adds gpu accelerated rendering for content and root layers.
Layer textures are updated in two stages:

  1. Paint: The non-accelerated path paints the layer contents into a bitmap.

The accelerated path paints into an SkPicture, which is essentially a display list.

  1. Upload: The non-accelerated path uploads the pixels obtained in the first stage to a texture.

The accelerated path renders the picture directly into the texture.

The accelerated path can be enabled by --enable-accelerated-drawing command-line flag in chromium.
Note that this patch does not accelerate the CG path on mac. We have two options here - use skia or accelrate CG path.
Any bugs should be caught by layout tests.

  • platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater):
  • platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::skiaContext): (WebCore::LayerRendererChromium::updateAndDrawLayers): (WebCore::LayerRendererChromium::createRootLayerTextureUpdater):
  • platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::acceleratedDrawing):
  • platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture): (WebCore::LayerTextureUpdaterSkPicture::~LayerTextureUpdaterSkPicture): (WebCore::LayerTextureUpdaterSkPicture::prepareToUpdate): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::deleteFrameBuffer): (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer): (WebCore::LayerTextureUpdaterSkPicture::clearFrameBuffer):
  • platform/graphics/chromium/LayerTextureUpdaterCanvas.h: (WebCore::LayerTextureUpdaterSkPicture::orientation):
  • platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::updateRect): (WebCore::LayerTilerChromium::draw):
Location:
trunk/Source
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87166 r87167  
     12011-05-24  Alok Priyadarshi  <alokp@chromium.org>
     2
     3        Reviewed by James Robinson.
     4
     5        Enable skia gpu rendering for content layers
     6        https://bugs.webkit.org/show_bug.cgi?id=56749
     7
     8        This patch adds gpu accelerated rendering for content and root layers.
     9        Layer textures are updated in two stages:
     10        1. Paint: The non-accelerated path paints the layer contents into a bitmap.
     11                  The accelerated path paints into an SkPicture, which is essentially a display list.
     12        2. Upload: The non-accelerated path uploads the pixels obtained in the first stage to a texture.
     13                   The accelerated path renders the picture directly into the texture.
     14
     15        The accelerated path can be enabled by --enable-accelerated-drawing command-line flag in chromium.
     16        Note that this patch does not accelerate the CG path on mac. We have two options here - use skia or accelrate CG path.
     17        Any bugs should be caught by layout tests.
     18
     19        * platform/graphics/chromium/ContentLayerChromium.cpp:
     20        (WebCore::ContentLayerChromium::createTextureUpdater):
     21        * platform/graphics/chromium/LayerRendererChromium.cpp:
     22        (WebCore::LayerRendererChromium::create):
     23        (WebCore::LayerRendererChromium::LayerRendererChromium):
     24        (WebCore::LayerRendererChromium::skiaContext):
     25        (WebCore::LayerRendererChromium::updateAndDrawLayers):
     26        (WebCore::LayerRendererChromium::createRootLayerTextureUpdater):
     27        * platform/graphics/chromium/LayerRendererChromium.h:
     28        (WebCore::LayerRendererChromium::acceleratedDrawing):
     29        * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
     30        (WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture):
     31        (WebCore::LayerTextureUpdaterSkPicture::~LayerTextureUpdaterSkPicture):
     32        (WebCore::LayerTextureUpdaterSkPicture::prepareToUpdate):
     33        (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
     34        (WebCore::LayerTextureUpdaterSkPicture::deleteFrameBuffer):
     35        (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
     36        (WebCore::LayerTextureUpdaterSkPicture::clearFrameBuffer):
     37        * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
     38        (WebCore::LayerTextureUpdaterSkPicture::orientation):
     39        * platform/graphics/chromium/LayerTilerChromium.cpp:
     40        (WebCore::LayerTilerChromium::updateRect):
     41        (WebCore::LayerTilerChromium::draw):
     42
    1432011-05-24  Pavel Podivilov  <podivilov@chromium.org>
    244
  • trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp

    r86816 r87167  
    129129{
    130130    OwnPtr<LayerPainterChromium> painter = adoptPtr(new ContentLayerPainter(m_owner));
     131#if USE(SKIA)
     132    if (layerRenderer()->accelerateDrawing())
     133        return adoptPtr(new LayerTextureUpdaterSkPicture(layerRendererContext(), painter.release(), layerRenderer()->skiaContext()));
     134#endif
    131135    return adoptPtr(new LayerTextureUpdaterBitmap(layerRendererContext(), painter.release(), layerRenderer()->contextSupportsMapSub()));
    132136}
  • trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp

    r86975 r87167  
    5252#include "cc/CCLayerImpl.h"
    5353#if USE(SKIA)
     54#include "Extensions3D.h"
     55#include "GrContext.h"
    5456#include "NativeImageSkia.h"
    5557#include "PlatformContextSkia.h"
     
    9799}
    98100
    99 PassRefPtr<LayerRendererChromium> LayerRendererChromium::create(PassRefPtr<GraphicsContext3D> context, PassOwnPtr<LayerPainterChromium> contentPaint)
     101PassRefPtr<LayerRendererChromium> LayerRendererChromium::create(PassRefPtr<GraphicsContext3D> context, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing)
    100102{
    101103    if (!context)
    102104        return 0;
    103105
    104     RefPtr<LayerRendererChromium> layerRenderer(adoptRef(new LayerRendererChromium(context, contentPaint)));
     106    RefPtr<LayerRendererChromium> layerRenderer(adoptRef(new LayerRendererChromium(context, contentPaint, accelerateDrawing)));
    105107    if (!layerRenderer->hardwareCompositing())
    106108        return 0;
     
    110112
    111113LayerRendererChromium::LayerRendererChromium(PassRefPtr<GraphicsContext3D> context,
    112                                              PassOwnPtr<LayerPainterChromium> contentPaint)
     114                                             PassOwnPtr<LayerPainterChromium> contentPaint,
     115                                             bool accelerateDrawing)
    113116    : m_viewportScrollPosition(IntPoint(-1, -1))
    114117    , m_rootLayer(0)
     118    , m_accelerateDrawing(accelerateDrawing)
    115119    , m_currentRenderSurface(0)
    116120    , m_offscreenFramebufferId(0)
     
    128132    m_hardwareCompositing = initializeSharedObjects();
    129133
    130     OwnPtr<LayerTextureUpdater> textureUpdater = adoptPtr(new LayerTextureUpdaterBitmap(m_context.get(), contentPaint, m_contextSupportsMapSub));
    131     m_rootLayerContentTiler = LayerTilerChromium::create(this, textureUpdater.release(), IntSize(256, 256), LayerTilerChromium::NoBorderTexels);
     134    m_rootLayerContentTiler = LayerTilerChromium::create(this, createRootLayerTextureUpdater(contentPaint), IntSize(256, 256), LayerTilerChromium::NoBorderTexels);
    132135    ASSERT(m_rootLayerContentTiler);
    133136
     
    145148    return m_context.get();
    146149}
     150
     151#if USE(SKIA)
     152GrContext* LayerRendererChromium::skiaContext()
     153{
     154    if (!m_skiaContext) {
     155        WebCore::Extensions3D* extensions = m_context->getExtensions();
     156        extensions->ensureEnabled("GL_EXT_texture_format_BGRA8888");
     157        extensions->ensureEnabled("GL_EXT_read_format_bgra");
     158
     159        m_skiaContext = adoptPtr(GrContext::CreateGLShaderContext());
     160        // Limit the number of textures we hold in the bitmap->texture cache.
     161        static const int maxTextureCacheCount = 512;
     162        // Limit the bytes allocated toward textures in the bitmap->texture cache.
     163        static const size_t maxTextureCacheBytes = 50 * 1024 * 1024;
     164        m_skiaContext->setTextureCacheLimits(maxTextureCacheCount, maxTextureCacheBytes);
     165    }
     166    return m_skiaContext.get();
     167}
     168#endif
    147169
    148170void LayerRendererChromium::debugGLCall(GraphicsContext3D* context, const char* command, const char* file, int line)
     
    261283}
    262284
     285PassOwnPtr<LayerTextureUpdater> LayerRendererChromium::createRootLayerTextureUpdater(PassOwnPtr<LayerPainterChromium> painter)
     286{
     287#if USE(SKIA)
     288    if (accelerateDrawing())
     289        return adoptPtr(new LayerTextureUpdaterSkPicture(context(), painter, skiaContext()));
     290#endif
     291    return adoptPtr(new LayerTextureUpdaterBitmap(context(), painter, contextSupportsMapSub()));
     292}
     293
    263294void LayerRendererChromium::updateLayers(LayerList& renderSurfaceLayerList)
    264295{
  • trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h

    r86975 r87167  
    5959#endif
    6060
     61#if USE(SKIA)
     62class GrContext;
     63#endif
     64
    6165namespace WebCore {
    6266
     
    7074class LayerRendererChromium : public RefCounted<LayerRendererChromium> {
    7175public:
    72     static PassRefPtr<LayerRendererChromium> create(PassRefPtr<GraphicsContext3D>, PassOwnPtr<LayerPainterChromium> contentPaint);
     76    static PassRefPtr<LayerRendererChromium> create(PassRefPtr<GraphicsContext3D>, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing);
    7377
    7478    ~LayerRendererChromium();
     
    7680    GraphicsContext3D* context();
    7781    bool contextSupportsMapSub() const { return m_contextSupportsMapSub; }
     82#if USE(SKIA)
     83    GrContext* skiaContext();
     84#endif
    7885
    7986    void invalidateRootLayerRect(const IntRect& dirtyRect);
     
    102109
    103110    bool hardwareCompositing() const { return m_hardwareCompositing; }
     111    bool accelerateDrawing() const { return m_accelerateDrawing; }
    104112
    105113    void setCompositeOffscreen(bool);
     
    151159    RefPtr<CCLayerImpl> m_rootCCLayerImpl;
    152160
    153     LayerRendererChromium(PassRefPtr<GraphicsContext3D>, PassOwnPtr<LayerPainterChromium> contentPaint);
     161    LayerRendererChromium(PassRefPtr<GraphicsContext3D>, PassOwnPtr<LayerPainterChromium> contentPaint, bool accelerateDrawing);
     162
     163    PassOwnPtr<LayerTextureUpdater> createRootLayerTextureUpdater(PassOwnPtr<LayerPainterChromium>);
    154164
    155165    void updateLayers(LayerList& renderSurfaceLayerList);
     
    194204
    195205    bool m_hardwareCompositing;
     206    bool m_accelerateDrawing;
    196207
    197208    RenderSurfaceChromium* m_currentRenderSurface;
    198 
    199209    unsigned m_offscreenFramebufferId;
    200210    bool m_compositeOffscreen;
     
    223233
    224234    RefPtr<GraphicsContext3D> m_context;
     235#if USE(SKIA)
     236    OwnPtr<GrContext> m_skiaContext;
     237#endif
     238
    225239    ChildContextMap m_childContexts;
    226 
    227240    // If true, the child contexts were copied to the compositor texture targets
    228241    // and the compositor will need to wait on the proper latches before using
  • trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp

    r86805 r87167  
    3636#include "TraceEvent.h"
    3737
     38#if USE(SKIA)
     39#include "GrContext.h"
     40#include "PlatformContextSkia.h"
     41#include "SkCanvas.h"
     42#include "SkGpuDevice.h"
     43#include "SkGpuDeviceFactory.h"
     44#endif // USE(SKIA)
     45
    3846namespace WebCore {
    3947
     
    8290}
    8391
     92#if USE(SKIA)
     93LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture(GraphicsContext3D* context, PassOwnPtr<LayerPainterChromium> painter, GrContext* skiaContext)
     94    : LayerTextureUpdaterCanvas(context, painter)
     95    , m_skiaContext(skiaContext)
     96    , m_createFrameBuffer(false)
     97    , m_fbo(0)
     98    , m_stencilBuffer(0)
     99{
     100}
     101
     102LayerTextureUpdaterSkPicture::~LayerTextureUpdaterSkPicture()
     103{
     104    deleteFrameBuffer();
     105}
     106
     107void LayerTextureUpdaterSkPicture::prepareToUpdate(const IntRect& contentRect, const IntSize& tileSize, int borderTexels)
     108{
     109    // Need to recreate FBO if tile-size changed.
     110    // Note that we cannot create the framebuffer here because this function does not run in compositor thread
     111    // and hence does not have access to compositor context.
     112    if (m_bufferSize != tileSize) {
     113        m_createFrameBuffer = true;
     114        m_bufferSize = tileSize;
     115    }
     116
     117    SkCanvas* canvas = m_picture.beginRecording(contentRect.width(), contentRect.height());
     118    PlatformContextSkia platformContext(canvas);
     119    GraphicsContext graphicsContext(&platformContext);
     120    paintContents(graphicsContext, contentRect);
     121    m_picture.endRecording();
     122}
     123
     124void LayerTextureUpdaterSkPicture::updateTextureRect(LayerTexture* texture, const IntRect& sourceRect, const IntRect& destRect)
     125{
     126    if (m_createFrameBuffer) {
     127        deleteFrameBuffer();
     128        createFrameBuffer();
     129        m_createFrameBuffer = false;
     130    }
     131    if (!m_fbo)
     132        return;
     133
     134    // Bind texture.
     135    context()->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_fbo);
     136    texture->framebufferTexture2D();
     137    ASSERT(context()->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) == GraphicsContext3D::FRAMEBUFFER_COMPLETE);
     138
     139    context()->viewport(0, 0, m_bufferSize.width(), m_bufferSize.height());
     140    clearFrameBuffer();
     141
     142    // Notify SKIA to sync its internal GL state.
     143    m_skiaContext->resetContext();
     144    // Offset from source rectangle to this destination rectangle.
     145    IntPoint offset(sourceRect.x() - contentRect().x(), sourceRect.y() - contentRect().y());
     146    m_canvas->save();
     147    m_canvas->translate(-offset.x(), -offset.y());
     148    m_canvas->drawPicture(m_picture);
     149    m_canvas->restore();
     150    // Flush SKIA context so that all the rendered stuff appears on the texture.
     151    m_skiaContext->flush(GrContext::kForceCurrentRenderTarget_FlushBit);
     152
     153    // Unbind texture.
     154    context()->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0, GraphicsContext3D::TEXTURE_2D, 0, 0);
     155    context()->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0);
     156}
     157
     158void LayerTextureUpdaterSkPicture::deleteFrameBuffer()
     159{
     160    m_canvas.clear();
     161
     162    if (m_stencilBuffer)
     163        context()->deleteRenderbuffer(m_stencilBuffer);
     164    if (m_fbo)
     165        context()->deleteFramebuffer(m_fbo);
     166}
     167
     168bool LayerTextureUpdaterSkPicture::createFrameBuffer()
     169{
     170    ASSERT(!m_fbo);
     171    ASSERT(!m_bufferSize.isEmpty());
     172
     173    // SKIA needs stencil buffer for path rendering.
     174    // Make sure it is available.
     175    GraphicsContext3D::Attributes contextAttribs = context()->getContextAttributes();
     176    if (!contextAttribs.stencil)
     177        return false;
     178
     179    // Create and bind a frame-buffer-object.
     180    m_fbo = context()->createFramebuffer();
     181    if (!m_fbo)
     182        return false;
     183    context()->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_fbo);
     184
     185    // We just need to create a stencil buffer for FBO.
     186    // The color buffer (texture) will be provided by tiles.
     187    // SKIA does not need depth buffer.
     188    m_stencilBuffer = context()->createRenderbuffer();
     189    if (!m_stencilBuffer) {
     190        context()->deleteFramebuffer(m_fbo);
     191        m_fbo = 0;
     192        return false;
     193    }
     194    context()->bindRenderbuffer(GraphicsContext3D::RENDERBUFFER, m_stencilBuffer);
     195    context()->renderbufferStorage(GraphicsContext3D::RENDERBUFFER, GraphicsContext3D::STENCIL_INDEX8, m_bufferSize.width(), m_bufferSize.height());
     196    context()->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, m_stencilBuffer);
     197
     198    // Create a skia gpu canvas.
     199    GrPlatformSurfaceDesc targetDesc;
     200    targetDesc.reset();
     201    targetDesc.fSurfaceType = kRenderTarget_GrPlatformSurfaceType;
     202    targetDesc.fRenderTargetFlags = kNone_GrPlatformRenderTargetFlagBit;
     203    targetDesc.fWidth = m_bufferSize.width();
     204    targetDesc.fHeight = m_bufferSize.height();
     205    targetDesc.fConfig = kRGBA_8888_GrPixelConfig;
     206    targetDesc.fStencilBits = 8;
     207    targetDesc.fPlatformRenderTarget = m_fbo;
     208    SkAutoTUnref<GrRenderTarget> target(static_cast<GrRenderTarget*>(m_skiaContext->createPlatformSurface(targetDesc)));
     209    SkAutoTUnref<SkDeviceFactory> factory(new SkGpuDeviceFactory(m_skiaContext, target.get()));
     210    SkAutoTUnref<SkDevice> device(factory.get()->newDevice(0, SkBitmap::kARGB_8888_Config, m_bufferSize.width(), m_bufferSize.height(), false, false));       
     211    m_canvas = adoptPtr(new SkCanvas(factory.get()));
     212    m_canvas->setDevice(device.get());
     213
     214    context()->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0);
     215    return true;
     216}
     217
     218void LayerTextureUpdaterSkPicture::clearFrameBuffer()
     219{
     220#ifndef NDEBUG
     221    // Clear to green to make it easier to spot unrendered regions.
     222    context()->clearColor(0, 1, 0, 1);
     223    context()->clear(GraphicsContext3D::COLOR_BUFFER_BIT | GraphicsContext3D::STENCIL_BUFFER_BIT);
     224#endif
     225}
     226#endif // SKIA
     227
    84228} // namespace WebCore
    85229#endif // USE(ACCELERATED_COMPOSITING)
  • trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.h

    r86805 r87167  
    3030#if USE(ACCELERATED_COMPOSITING)
    3131
     32#include "GraphicsTypes3D.h"
    3233#include "LayerTextureSubImage.h"
    3334#include "LayerTextureUpdater.h"
    3435#include "PlatformCanvas.h"
    3536#include <wtf/PassOwnPtr.h>
     37
     38#if USE(SKIA)
     39#include "SkPicture.h"
     40
     41class GrContext;
     42class SkCanvas;
     43class SkPicture;
     44#endif
    3645
    3746namespace WebCore {
     
    7079};
    7180
     81#if USE(SKIA)
     82class LayerTextureUpdaterSkPicture : public LayerTextureUpdaterCanvas {
     83public:
     84    LayerTextureUpdaterSkPicture(GraphicsContext3D*, PassOwnPtr<LayerPainterChromium>, GrContext*);
     85    virtual ~LayerTextureUpdaterSkPicture();
     86
     87    virtual Orientation orientation() { return LayerTextureUpdater::TopDownOrientation; }
     88    virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tileSize, int borderTexels);
     89    virtual void updateTextureRect(LayerTexture*, const IntRect& sourceRect, const IntRect& destRect);
     90
     91private:
     92    void deleteFrameBuffer();
     93    bool createFrameBuffer();
     94    void clearFrameBuffer();
     95
     96    GrContext* m_skiaContext; // SKIA graphics context.
     97
     98    bool m_createFrameBuffer; // Need to create FBO if true.
     99    SkPicture m_picture; // Recording canvas.
     100    IntSize m_bufferSize; // Frame buffer size.
     101    Platform3DObject m_fbo; // Frame buffer id.
     102    Platform3DObject m_stencilBuffer;
     103    OwnPtr<SkCanvas> m_canvas; // GPU accelerated canvas.
     104};
     105#endif // SKIA
     106
    72107} // namespace WebCore
    73108#endif // USE(ACCELERATED_COMPOSITING)
  • trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp

    r86975 r87167  
    319319            GLC(context, context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, filter));
    320320            GLC(context, context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, filter));
     321            GLC(context, context->bindTexture(GraphicsContext3D::TEXTURE_2D, 0));
    321322
    322323            m_textureUpdater->updateTextureRect(tile->texture(), sourceRect, destRect);
     
    340341    GLC(context, context->useProgram(program->program()));
    341342    GLC(context, context->uniform1i(program->fragmentShader().samplerLocation(), 0));
     343    GLC(context, context->activeTexture(GraphicsContext3D::TEXTURE0));
    342344
    343345    int left, top, right, bottom;
  • trunk/Source/WebKit/chromium/ChangeLog

    r87146 r87167  
     12011-05-24  Alok Priyadarshi  <alokp@chromium.org>
     2
     3        Reviewed by James Robinson.
     4
     5        Enable skia gpu rendering for content layers
     6        https://bugs.webkit.org/show_bug.cgi?id=56749
     7
     8        * src/WebViewImpl.cpp:
     9        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
     10        (WebKit::WebViewImpl::reallocateRenderer):
     11
    1122011-05-24  Mikhail Naganov  <mnaganov@chromium.org>
    213
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r86816 r87167  
    24792479
    24802480
    2481         m_layerRenderer = LayerRendererChromium::create(context.release(), WebViewImplContentPainter::create(this));
     2481        m_layerRenderer = LayerRendererChromium::create(context.release(), WebViewImplContentPainter::create(this), m_page->settings()->acceleratedDrawingEnabled());
    24822482        if (m_layerRenderer) {
    24832483            m_client->didActivateAcceleratedCompositing(true);
     
    25232523            getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
    25242524    // GraphicsContext3D::create might fail and return 0, in that case LayerRendererChromium::create will also return 0.
    2525     RefPtr<LayerRendererChromium> layerRenderer = LayerRendererChromium::create(newContext, WebViewImplContentPainter::create(this));
     2525    RefPtr<LayerRendererChromium> layerRenderer = LayerRendererChromium::create(newContext, WebViewImplContentPainter::create(this), m_page->settings()->acceleratedDrawingEnabled());
    25262526
    25272527    // Reattach the root layer.  Child layers will get reattached as a side effect of updateLayersRecursive.
Note: See TracChangeset for help on using the changeset viewer.