Changeset 112124 in webkit


Ignore:
Timestamp:
Mar 26, 2012 10:43:05 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Accelerated compositing updates
https://bugs.webkit.org/show_bug.cgi?id=82058

Patch by Filip Spacek <fspacek@rim.com> on 2012-03-26
Reviewed by Rob Buis.

  • platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:

(WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
(WebCore::CanvasLayerWebKitThread::~CanvasLayerWebKitThread):
(WebCore::CanvasLayerWebKitThread::setDevice):
(WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded):

  • platform/graphics/blackberry/CanvasLayerWebKitThread.h:

(WebCore::CanvasLayerWebKitThread::create):
(CanvasLayerWebKitThread):

  • platform/graphics/blackberry/InstrumentedPlatformCanvas.h:

(WebCore::InstrumentedPlatformCanvas::InstrumentedPlatformCanvas):
(WebCore::InstrumentedPlatformCanvas::save):
(WebCore::InstrumentedPlatformCanvas::saveLayer):
(WebCore::InstrumentedPlatformCanvas::restore):
(WebCore::InstrumentedPlatformCanvas::translate):
(WebCore::InstrumentedPlatformCanvas::scale):
(WebCore::InstrumentedPlatformCanvas::rotate):
(WebCore::InstrumentedPlatformCanvas::skew):
(WebCore::InstrumentedPlatformCanvas::concat):
(WebCore::InstrumentedPlatformCanvas::setMatrix):
(WebCore::InstrumentedPlatformCanvas::clipRect):
(WebCore::InstrumentedPlatformCanvas::clipPath):
(WebCore::InstrumentedPlatformCanvas::clipRegion):
(WebCore::InstrumentedPlatformCanvas::clear):
(WebCore::InstrumentedPlatformCanvas::drawPaint):
(WebCore::InstrumentedPlatformCanvas::drawPoints):
(WebCore::InstrumentedPlatformCanvas::drawRect):
(WebCore::InstrumentedPlatformCanvas::drawPath):
(WebCore::InstrumentedPlatformCanvas::drawBitmap):
(WebCore::InstrumentedPlatformCanvas::drawBitmapRect):
(WebCore::InstrumentedPlatformCanvas::drawBitmapMatrix):
(WebCore::InstrumentedPlatformCanvas::drawSprite):
(WebCore::InstrumentedPlatformCanvas::drawText):
(WebCore::InstrumentedPlatformCanvas::drawPosText):
(WebCore::InstrumentedPlatformCanvas::drawPosTextH):
(WebCore::InstrumentedPlatformCanvas::drawTextOnPath):
(WebCore::InstrumentedPlatformCanvas::drawPicture):
(WebCore::InstrumentedPlatformCanvas::drawVertices):
(WebCore::InstrumentedPlatformCanvas::drawData):

  • platform/graphics/blackberry/LayerData.h:

(WebCore::LayerData::LayerData):
(WebCore::LayerData::needsTexture):
(LayerData):

  • platform/graphics/blackberry/LayerTiler.cpp:

(WebCore::LayerTiler::updateTextureContentsIfNeeded):

  • platform/graphics/blackberry/LayerWebKitThread.cpp:

(WebCore::LayerWebKitThread::paintContents):
(WebCore::LayerWebKitThread::setDrawable):

  • platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:

(WebCore::loadBufferingImageData):

  • platform/graphics/blackberry/skia/ImageBufferDataSkia.h: Renamed from Source/WebCore/platform/graphics/blackberry/skia/ImageBufferData.h.

(WebCore):
(ImageBufferData):

Location:
trunk/Source/WebCore
Files:
9 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112119 r112124  
     12012-03-26  Filip Spacek  <fspacek@rim.com>
     2
     3        [BlackBerry] Accelerated compositing updates
     4        https://bugs.webkit.org/show_bug.cgi?id=82058
     5
     6        Reviewed by Rob Buis.
     7
     8        * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
     9        (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
     10        (WebCore::CanvasLayerWebKitThread::~CanvasLayerWebKitThread):
     11        (WebCore::CanvasLayerWebKitThread::setDevice):
     12        (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded):
     13        * platform/graphics/blackberry/CanvasLayerWebKitThread.h:
     14        (WebCore::CanvasLayerWebKitThread::create):
     15        (CanvasLayerWebKitThread):
     16        * platform/graphics/blackberry/InstrumentedPlatformCanvas.h:
     17        (WebCore::InstrumentedPlatformCanvas::InstrumentedPlatformCanvas):
     18        (WebCore::InstrumentedPlatformCanvas::save):
     19        (WebCore::InstrumentedPlatformCanvas::saveLayer):
     20        (WebCore::InstrumentedPlatformCanvas::restore):
     21        (WebCore::InstrumentedPlatformCanvas::translate):
     22        (WebCore::InstrumentedPlatformCanvas::scale):
     23        (WebCore::InstrumentedPlatformCanvas::rotate):
     24        (WebCore::InstrumentedPlatformCanvas::skew):
     25        (WebCore::InstrumentedPlatformCanvas::concat):
     26        (WebCore::InstrumentedPlatformCanvas::setMatrix):
     27        (WebCore::InstrumentedPlatformCanvas::clipRect):
     28        (WebCore::InstrumentedPlatformCanvas::clipPath):
     29        (WebCore::InstrumentedPlatformCanvas::clipRegion):
     30        (WebCore::InstrumentedPlatformCanvas::clear):
     31        (WebCore::InstrumentedPlatformCanvas::drawPaint):
     32        (WebCore::InstrumentedPlatformCanvas::drawPoints):
     33        (WebCore::InstrumentedPlatformCanvas::drawRect):
     34        (WebCore::InstrumentedPlatformCanvas::drawPath):
     35        (WebCore::InstrumentedPlatformCanvas::drawBitmap):
     36        (WebCore::InstrumentedPlatformCanvas::drawBitmapRect):
     37        (WebCore::InstrumentedPlatformCanvas::drawBitmapMatrix):
     38        (WebCore::InstrumentedPlatformCanvas::drawSprite):
     39        (WebCore::InstrumentedPlatformCanvas::drawText):
     40        (WebCore::InstrumentedPlatformCanvas::drawPosText):
     41        (WebCore::InstrumentedPlatformCanvas::drawPosTextH):
     42        (WebCore::InstrumentedPlatformCanvas::drawTextOnPath):
     43        (WebCore::InstrumentedPlatformCanvas::drawPicture):
     44        (WebCore::InstrumentedPlatformCanvas::drawVertices):
     45        (WebCore::InstrumentedPlatformCanvas::drawData):
     46        * platform/graphics/blackberry/LayerData.h:
     47        (WebCore::LayerData::LayerData):
     48        (WebCore::LayerData::needsTexture):
     49        (LayerData):
     50        * platform/graphics/blackberry/LayerTiler.cpp:
     51        (WebCore::LayerTiler::updateTextureContentsIfNeeded):
     52        * platform/graphics/blackberry/LayerWebKitThread.cpp:
     53        (WebCore::LayerWebKitThread::paintContents):
     54        (WebCore::LayerWebKitThread::setDrawable):
     55        * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
     56        (WebCore::loadBufferingImageData):
     57        * platform/graphics/blackberry/skia/ImageBufferDataSkia.h: Renamed from Source/WebCore/platform/graphics/blackberry/skia/ImageBufferData.h.
     58        (WebCore):
     59        (ImageBufferData):
     60
    1612012-03-26  Stephen Chenney  <schenney@chromium.org>
    262
  • trunk/Source/WebCore/platform/graphics/blackberry/CanvasLayerWebKitThread.cpp

    r109668 r112124  
    2020#include "CanvasLayerWebKitThread.h"
    2121
    22 #if USE(ACCELERATED_COMPOSITING) && ENABLE(SKIA_GPU_CANVAS)
     22#if USE(ACCELERATED_COMPOSITING) && ENABLE(ACCELERATED_2D_CANVAS)
    2323
    24 #include "HTMLCanvasElement.h"
    25 #include "PlatformContextSkia.h"
    26 
    27 #include <BlackBerryPlatformGraphics.h>
     24#include "SharedGraphicsContext3D.h"
    2825#include <GLES2/gl2.h>
    29 #include <GrGLTexture.h>
    3026#include <SkGpuDevice.h>
    3127
    3228namespace WebCore {
    3329
    34 CanvasLayerWebKitThread::CanvasLayerWebKitThread(HTMLCanvasElement* canvas)
    35     : LayerWebKitThread(Layer, 0)
     30CanvasLayerWebKitThread::CanvasLayerWebKitThread(SkGpuDevice* device)
     31    : LayerWebKitThread(CanvasLayer, 0)
    3632{
    37     setCanvas(canvas);
     33    setDevice(device);
    3834}
    3935
     
    4137{
    4238    if (m_texID) {
    43         BlackBerry::Platform::Graphics::makeSharedResourceContextCurrent(BlackBerry::Platform::Graphics::GLES2);
     39        SharedGraphicsContext3D::get()->makeContextCurrent();
    4440        glDeleteTextures(1, &m_texID);
    4541    }
    4642}
    4743
    48 void CanvasLayerWebKitThread::setCanvas(HTMLCanvasElement* canvas)
     44void CanvasLayerWebKitThread::setDevice(SkGpuDevice* device)
    4945{
    50     m_canvas = canvas;
    51     setNeedsTexture(isDrawable() && canvas);
     46    m_device = device;
    5247    setLayerProgramShader(LayerProgramShaderRGBA);
    5348    setNeedsDisplay();
     
    6257void CanvasLayerWebKitThread::updateTextureContentsIfNeeded()
    6358{
    64     if (!m_needsDisplay)
     59    if (!m_needsDisplay || !m_device)
    6560        return;
    6661
    6762    m_needsDisplay = false;
    68 
    69     if (!m_canvas || !m_canvas->drawingContext())
    70         return;
    71 
    72     SkGpuDevice* gpuDevice = static_cast<SkGpuDevice*>(m_canvas->drawingContext()->platformContext()->canvas()->getDevice());
    73     gpuDevice->makeRenderTargetCurrent();
    74     // We know this is a GrGLTexture
    75     if (GrGLTexture* deviceTexture = (GrGLTexture*)gpuDevice->accessTexture()) {
    76         m_texWidth = deviceTexture->allocWidth();
    77         m_texHeight = deviceTexture->allocHeight();
    78     }
     63    m_device->makeRenderTargetCurrent();
    7964
    8065    GLint previousTexture;
     
    8873        glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    8974        glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
    90         glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_canvas->width(), m_canvas->height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
     75        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_device->width(), m_device->height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
    9176
    9277        createFrontBufferLock();
     
    9580    pthread_mutex_lock(m_frontBufferLock);
    9681    glBindTexture(GL_TEXTURE_2D, m_texID);
    97     glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, m_texWidth, m_texHeight, 0);
     82    glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, m_device->width(), m_device->height(), 0);
    9883    glBindTexture(GL_TEXTURE_2D, previousTexture);
    9984    pthread_mutex_unlock(m_frontBufferLock);
     
    10287}
    10388
    104 #endif // USE(ACCELERATED_COMPOSITING) && ENABLE(SKIA_GPU_CANVAS)
     89#endif // USE(ACCELERATED_COMPOSITING) && ENABLE(ACCELERATED_2D_CANVAS)
  • trunk/Source/WebCore/platform/graphics/blackberry/CanvasLayerWebKitThread.h

    r109668 r112124  
    2020#define CanvasLayerWebKitThread_h
    2121
    22 #if USE(ACCELERATED_COMPOSITING) && ENABLE(SKIA_GPU_CANVAS)
     22#if USE(ACCELERATED_COMPOSITING) && ENABLE(ACCELERATED_2D_CANVAS)
    2323
    2424#include "LayerWebKitThread.h"
     25
     26class SkGpuDevice;
    2527
    2628namespace WebCore {
     
    3032class CanvasLayerWebKitThread : public LayerWebKitThread {
    3133public:
    32     static PassRefPtr<CanvasLayerWebKitThread> create(HTMLCanvasElement* canvas)
     34    static PassRefPtr<CanvasLayerWebKitThread> create(SkGpuDevice* device)
    3335    {
    34         return adoptRef(new CanvasLayerWebKitThread(canvas));
     36        return adoptRef(new CanvasLayerWebKitThread(device));
    3537    }
    3638
    3739    virtual ~CanvasLayerWebKitThread();
    3840
    39     void setCanvas(HTMLCanvasElement*);
     41    void setDevice(SkGpuDevice*);
    4042
    4143    virtual void setNeedsDisplay();
     
    4547
    4648private:
    47     CanvasLayerWebKitThread(HTMLCanvasElement*);
     49    CanvasLayerWebKitThread(SkGpuDevice*);
    4850    bool m_needsDisplay;
     51    SkGpuDevice* m_device;
    4952};
    5053
    5154}
    5255
    53 #endif // USE(ACCELERATED_COMPOSITING) && ENABLE(SKIA_GPU_CANVAS)
     56#endif // USE(ACCELERATED_COMPOSITING) && ENABLE(ACCELERATED_2D_CANVAS)
    5457
    5558#endif // CanvasLayerWebKitThread_h
  • trunk/Source/WebCore/platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp

    r110171 r112124  
    188188    canvasBitmap.setConfig(SkBitmap::kARGB_8888_Config, canvasWidth, canvasHeight);
    189189    canvasBitmap.allocPixels(0, 0);
    190     bool rc = canvasBitmap.copyPixelsFrom(static_cast<void*>(const_cast<unsigned char*>(tempPixels)), imageWidth * imageHeight * 4);
     190    canvasBitmap.lockPixels();
     191    memcpy(canvasBitmap.getPixels(), tempPixels, imageWidth * imageHeight * 4);
     192    canvasBitmap.unlockPixels();
    191193    delete [] tempPixels;
    192194
     
    195197
    196198    RefPtr<BitmapImageSingleFrameSkia> bitmapImage = BitmapImageSingleFrameSkia::create(canvasBitmap, false);
    197     if (rc)
    198         context->drawImage(bitmapImage.get(), ColorSpaceDeviceRGB, dst, src, CompositeCopy, false);
     199    context->drawImage(bitmapImage.get(), ColorSpaceDeviceRGB, dst, src, CompositeCopy, false);
    199200}
    200201
  • trunk/Source/WebCore/platform/graphics/blackberry/InstrumentedPlatformCanvas.h

    r109682 r112124  
    3535namespace WebCore {
    3636
    37 class InstrumentedPlatformCanvas : public skia::PlatformCanvas {
     37class InstrumentedPlatformCanvas : public SkCanvas {
    3838public:
    39     InstrumentedPlatformCanvas(int width, int height, bool is_opaque, SkDeviceFactory* factory)
    40         : skia::PlatformCanvas(width, height, is_opaque, factory)
    41         , m_size(width, height)
     39    InstrumentedPlatformCanvas(int width, int height)
     40        : m_size(width, height)
    4241        , m_isSolidColor(true)
    4342        , m_solidColor(0, 0, 0, 0)
    4443    {
     44        setDevice(new SkDevice(SkBitmap::kARGB_8888_Config, width, height))->unref();
    4545    }
    4646
     
    5454    {
    5555        WRAPCANVAS_LOG_ENTRY("");
    56         return skia::PlatformCanvas::save(flags);
     56        return SkCanvas::save(flags);
    5757    }
    5858
     
    6161        WRAPCANVAS_LOG_ENTRY("");
    6262        m_isSolidColor = false;
    63         return skia::PlatformCanvas::saveLayer(bounds, paint, flags);
     63        return SkCanvas::saveLayer(bounds, paint, flags);
    6464    }
    6565
     
    6767    {
    6868        WRAPCANVAS_LOG_ENTRY("");
    69         skia::PlatformCanvas::restore();
     69        SkCanvas::restore();
    7070    }
    7171
     
    7373    {
    7474        WRAPCANVAS_LOG_ENTRY("");
    75         return skia::PlatformCanvas::translate(dx, dy);
     75        return SkCanvas::translate(dx, dy);
    7676    }
    7777
     
    7979    {
    8080        WRAPCANVAS_LOG_ENTRY("");
    81         return skia::PlatformCanvas::scale(sx, sy);
     81        return SkCanvas::scale(sx, sy);
    8282    }
    8383
     
    8585    {
    8686        WRAPCANVAS_LOG_ENTRY("");
    87         return skia::PlatformCanvas::rotate(degrees);
     87        return SkCanvas::rotate(degrees);
    8888    }
    8989
     
    9191    {
    9292        WRAPCANVAS_LOG_ENTRY("");
    93         return skia::PlatformCanvas::skew(sx, sy);
     93        return SkCanvas::skew(sx, sy);
    9494    }
    9595
     
    9797    {
    9898        WRAPCANVAS_LOG_ENTRY("");
    99         return skia::PlatformCanvas::concat(matrix);
     99        return SkCanvas::concat(matrix);
    100100    }
    101101
     
    103103    {
    104104        WRAPCANVAS_LOG_ENTRY("");
    105         skia::PlatformCanvas::setMatrix(matrix);
     105        SkCanvas::setMatrix(matrix);
    106106    }
    107107
     
    109109    {
    110110        WRAPCANVAS_LOG_ENTRY("");
    111         return skia::PlatformCanvas::clipRect(rect, op);
     111        return SkCanvas::clipRect(rect, op);
    112112    }
    113113
     
    116116        WRAPCANVAS_LOG_ENTRY("");
    117117        m_isSolidColor = false;
    118         return skia::PlatformCanvas::clipPath(path, op);
     118        return SkCanvas::clipPath(path, op);
    119119    }
    120120
     
    123123        WRAPCANVAS_LOG_ENTRY("");
    124124        m_isSolidColor = false;
    125         return skia::PlatformCanvas::clipRegion(region, op);
     125        return SkCanvas::clipRegion(region, op);
    126126    }
    127127
     
    131131        m_isSolidColor = true;
    132132        m_solidColor = Color(color);
    133         skia::PlatformCanvas::clear(color);
     133        SkCanvas::clear(color);
    134134    }
    135135
     
    138138        WRAPCANVAS_LOG_ENTRY("");
    139139        m_isSolidColor = false;
    140         skia::PlatformCanvas::drawPaint(paint);
     140        SkCanvas::drawPaint(paint);
    141141    }
    142142
     
    146146        WRAPCANVAS_LOG_ENTRY("");
    147147        m_isSolidColor = false;
    148         skia::PlatformCanvas::drawPoints(mode, count, pts, paint);
     148        SkCanvas::drawPoints(mode, count, pts, paint);
    149149    }
    150150
     
    166166        } else
    167167            m_isSolidColor = false;
    168         skia::PlatformCanvas::drawRect(rect, paint);
     168        SkCanvas::drawRect(rect, paint);
    169169    }
    170170
     
    173173        WRAPCANVAS_LOG_ENTRY("");
    174174        m_isSolidColor = false;
    175         skia::PlatformCanvas::drawPath(path, paint);
     175        SkCanvas::drawPath(path, paint);
    176176    }
    177177
     
    181181        WRAPCANVAS_LOG_ENTRY("");
    182182        m_isSolidColor = false;
    183         skia::PlatformCanvas::drawBitmap(bitmap, left, top, paint);
     183        SkCanvas::drawBitmap(bitmap, left, top, paint);
    184184    }
    185185
     
    189189        WRAPCANVAS_LOG_ENTRY("");
    190190        m_isSolidColor = false;
    191         skia::PlatformCanvas::drawBitmapRect(bitmap, src, dst, paint);
     191        SkCanvas::drawBitmapRect(bitmap, src, dst, paint);
    192192    }
    193193
     
    197197        WRAPCANVAS_LOG_ENTRY("");
    198198        m_isSolidColor = false;
    199         skia::PlatformCanvas::drawBitmapMatrix(bitmap, matrix, paint);
     199        SkCanvas::drawBitmapMatrix(bitmap, matrix, paint);
    200200    }
    201201
     
    205205        WRAPCANVAS_LOG_ENTRY("");
    206206        m_isSolidColor = false;
    207         skia::PlatformCanvas::drawSprite(bitmap, left, top, paint);
     207        SkCanvas::drawSprite(bitmap, left, top, paint);
    208208    }
    209209
     
    213213        WRAPCANVAS_LOG_ENTRY("");
    214214        m_isSolidColor = false;
    215         skia::PlatformCanvas::drawText(text, byteLength, x, y, paint);
     215        SkCanvas::drawText(text, byteLength, x, y, paint);
    216216    }
    217217
     
    221221        WRAPCANVAS_LOG_ENTRY("");
    222222        m_isSolidColor = false;
    223         skia::PlatformCanvas::drawPosText(text, byteLength, pos, paint);
     223        SkCanvas::drawPosText(text, byteLength, pos, paint);
    224224    }
    225225
     
    229229        WRAPCANVAS_LOG_ENTRY("");
    230230        m_isSolidColor = false;
    231         skia::PlatformCanvas::drawPosTextH(text, byteLength, xpos, constY, paint);
     231        SkCanvas::drawPosTextH(text, byteLength, xpos, constY, paint);
    232232    }
    233233
     
    237237        WRAPCANVAS_LOG_ENTRY("");
    238238        m_isSolidColor = false;
    239         skia::PlatformCanvas::drawTextOnPath(text, byteLength, path, matrix, paint);
     239        SkCanvas::drawTextOnPath(text, byteLength, path, matrix, paint);
    240240    }
    241241
     
    244244        WRAPCANVAS_LOG_ENTRY("");
    245245        m_isSolidColor = false;
    246         skia::PlatformCanvas::drawPicture(picture);
     246        SkCanvas::drawPicture(picture);
    247247    }
    248248
     
    254254        WRAPCANVAS_LOG_ENTRY("");
    255255        m_isSolidColor = false;
    256         skia::PlatformCanvas::drawVertices(mode, vertexCount, vertices, texs, colors, xfermode, indices, indexCount, paint);
     256        SkCanvas::drawVertices(mode, vertexCount, vertices, texs, colors, xfermode, indices, indexCount, paint);
    257257    }
    258258
     
    261261        WRAPCANVAS_LOG_ENTRY("");
    262262        m_isSolidColor = false;
    263         skia::PlatformCanvas::drawData(data, size);
     263        SkCanvas::drawData(data, size);
    264264    }
    265265
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerData.h

    r109668 r112124  
    5555class LayerData {
    5656public:
    57     enum LayerType { Layer, TransformLayer, WebGLLayer };
     57    enum LayerType { Layer, TransformLayer, WebGLLayer, CanvasLayer };
    5858    enum FilterType { Linear, Nearest, Trilinear, Lanczos };
    5959    enum LayerProgramShader { LayerProgramShaderRGBA = 0,
     
    7575#endif
    7676        , m_texID(0)
    77         , m_texWidth(0)
    78         , m_texHeight(0)
    79         , m_canvas(0)
    8077        , m_frontBufferLock(0)
    8178        , m_suspendTime(0)
     
    131128    void setTextureID(unsigned int value) { m_texID = value; }
    132129
    133     bool needsTexture() const { return m_layerType == WebGLLayer ? true : m_needsTexture; }
     130    bool needsTexture() const { return m_layerType == WebGLLayer || m_layerType == CanvasLayer || m_needsTexture; }
    134131
    135132    LayerProgramShader layerProgramShader() const { return m_layerProgramShader; }
     
    147144    MediaPlayer* mediaPlayer() const { return m_mediaPlayer; }
    148145#endif
    149 
    150     HTMLCanvasElement* canvas() const { return m_canvas; }
    151146
    152147    void replicate(LayerData *to) const { *to = *this; }
     
    194189
    195190    unsigned m_texID;
    196     unsigned m_texWidth;
    197     unsigned m_texHeight;
    198 
    199     HTMLCanvasElement* m_canvas;
    200191
    201192    pthread_mutex_t* m_frontBufferLock;
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp

    r110300 r112124  
    176176                isOpaque = !static_cast<BitmapImage*>(image)->currentFrameHasAlpha();
    177177            if (NativeImagePtr nativeImage = image->nativeImageForCurrentFrame()) {
    178                 SkBitmap bitmap = SkBitmap(*nativeImage);
     178                SkBitmap bitmap = SkBitmap(nativeImage->bitmap());
    179179                addTextureJob(TextureJob::setContents(bitmap, isOpaque));
    180180            }
     
    230230        NativeImagePtr nativeImage = m_layer->contents()->nativeImageForCurrentFrame();
    231231        if (nativeImage) {
    232             SkBitmap bitmap = SkBitmap(*nativeImage);
     232            SkBitmap bitmap = SkBitmap(nativeImage->bitmap());
    233233            addTextureJob(TextureJob::setContents(bitmap, isOpaque));
    234234        }
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.cpp

    r110578 r112124  
    109109        IntRect untransformedContentsRect = contentsRect;
    110110
    111         canvas = adoptPtr(new InstrumentedPlatformCanvas(contentsRect.width(), contentsRect.height(), false, 0));
     111        canvas = adoptPtr(new InstrumentedPlatformCanvas(contentsRect.width(), contentsRect.height()));
    112112        PlatformContextSkia skiaContext(canvas.get());
    113113
     
    192192    m_isDrawable = isDrawable;
    193193
    194     setNeedsTexture(m_isDrawable && (drawsContent() || contents() || pluginView() || mediaPlayer() || canvas()));
     194    setNeedsTexture(m_isDrawable && (drawsContent() || contents() || pluginView() || mediaPlayer() || m_texID));
    195195    setNeedsCommit();
    196196}
  • trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp

    r109677 r112124  
    710710
    711711        loaded = true;
    712         nativeImage->lockPixels();
    713 
    714         int bufSize = nativeImage->width() * nativeImage->height() * 4;
    715         s_bufferingImageWidth = nativeImage->width();
    716         s_bufferingImageHeight = nativeImage->height();
     712        nativeImage->bitmap().lockPixels();
     713
     714        int bufSize = nativeImage->bitmap().width() * nativeImage->bitmap().height() * 4;
     715        s_bufferingImageWidth = nativeImage->bitmap().width();
     716        s_bufferingImageHeight = nativeImage->bitmap().height();
    717717        s_bufferingImageData = static_cast<char*>(malloc(bufSize));
    718         memcpy(s_bufferingImageData, nativeImage->getPixels(), bufSize);
    719 
    720         nativeImage->unlockPixels();
     718        memcpy(s_bufferingImageData, nativeImage->bitmap().getPixels(), bufSize);
     719
     720        nativeImage->bitmap().unlockPixels();
    721721        bufferingIcon->deref();
    722722    }
  • trunk/Source/WebCore/platform/graphics/blackberry/skia/ImageBufferDataSkia.h

    r112123 r112124  
    3030 */
    3131
    32 #ifndef ImageBufferData_h
    33 #define ImageBufferData_h
     32#ifndef ImageBufferDataSkia_h
     33#define ImageBufferDataSkia_h
    3434
    3535#include "BlackBerryPlatformGraphics.h"
    3636#include "PlatformContextSkia.h"
    37 
    38 #include "skia/ext/platform_canvas.h"
     37#if USE(ACCELERATED_COMPOSITING)
     38#include "LayerWebKitThread.h"
     39#endif
    3940
    4041namespace WebCore {
     
    4748    PlatformContextSkia m_platformContext;
    4849    BlackBerry::Platform::Graphics::Buffer* m_buffer;
     50#if USE(ACCELERATED_COMPOSITING)
     51    RefPtr<LayerWebKitThread> m_platformLayer;
     52#endif
    4953};
    5054
    5155} // namespace WebCore
    5256
    53 #endif // ImageBufferData_h
     57#endif // ImageBufferDataSkia_h
Note: See TracChangeset for help on using the changeset viewer.