Changeset 86182 in webkit


Ignore:
Timestamp:
May 10, 2011 2:53:32 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-05-10 Adam Barth <abarth@webkit.org>

Reviewed by David Levin.

Enable strict PassOwnPtr on Chromium
https://bugs.webkit.org/show_bug.cgi?id=60502

Technically there are a few bits in here that weren't reviewed by Dave,
but close enough for government work. This patch all fixes the
remaining strict PassOwnPtr violations on Chromium Linux.

  • platform/graphics/chromium/PlatformCanvas.cpp: (WebCore::PlatformCanvas::resize):
  • platform/graphics/chromium/SimpleFontDataLinux.cpp:
  • platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer):
  • platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86180 r86182  
     12011-05-10  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by David Levin.
     4
     5        Enable strict PassOwnPtr on Chromium
     6        https://bugs.webkit.org/show_bug.cgi?id=60502
     7
     8        Technically there are a few bits in here that weren't reviewed by Dave,
     9        but close enough for government work.  This patch all fixes  the
     10        remaining strict PassOwnPtr violations on Chromium Linux.
     11
     12        * platform/graphics/chromium/PlatformCanvas.cpp:
     13        (WebCore::PlatformCanvas::resize):
     14        * platform/graphics/chromium/SimpleFontDataLinux.cpp:
     15        * platform/graphics/skia/ImageBufferSkia.cpp:
     16        (WebCore::ImageBuffer::ImageBuffer):
     17        * platform/graphics/skia/PlatformContextSkia.cpp:
     18        (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
     19
    1202011-05-10  Brady Eidson  <beidson@apple.com>
    221
  • trunk/Source/WebCore/platform/graphics/chromium/PlatformCanvas.cpp

    r85527 r86182  
    5555    m_size = size;
    5656#if USE(SKIA)
    57     m_skiaCanvas = skia::CreateBitmapCanvas(size.width(), size.height(), false);
     57    m_skiaCanvas = adoptPtr(skia::CreateBitmapCanvas(size.width(), size.height(), false));
    5858#elif USE(CG)
    5959    size_t bufferSize = size.width() * size.height() * 4;
  • trunk/Source/WebCore/platform/graphics/chromium/SimpleFontDataLinux.cpp

    r81162 r86182  
    3030
    3131#include "config.h"
     32
     33// FIXME: Remove this define!
     34#define LOOSE_PASS_OWN_PTR
     35
    3236#include "SimpleFontData.h"
    3337
  • trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp

    r85135 r86182  
    6767    , m_size(size)
    6868{
    69     SkCanvas* canvas = skia::CreateBitmapCanvas(size.width(), size.height(), false);
     69    OwnPtr<SkCanvas> canvas = adoptPtr(skia::CreateBitmapCanvas(size.width(), size.height(), false));
    7070    if (!canvas) {
    7171        success = false;
     
    7373    }
    7474
    75     m_data.m_canvas = canvas;
     75    m_data.m_canvas = canvas.release();
    7676    m_data.m_platformContext.setCanvas(m_data.m_canvas.get());
    7777    m_context = adoptPtr(new GraphicsContext(&m_data.m_platformContext));
  • trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp

    r85716 r86182  
    724724#if ENABLE(ACCELERATED_2D_CANVAS)
    725725    if (context && drawingBuffer) {
    726         m_gpuCanvas = new GraphicsContextGPU(context, drawingBuffer, size);
     726        m_gpuCanvas = adoptPtr(new GraphicsContextGPU(context, drawingBuffer, size));
    727727        m_uploadTexture.clear();
    728728        drawingBuffer->setWillPublishCallback(WillPublishCallbackImpl::create(this));
     
    732732        if (gr) {
    733733            m_accelerationMode = SkiaGPU;
    734            
     734
    735735            context->makeContextCurrent();
    736736            m_gpuCanvas->bindFramebuffer();
     
    742742            drawingBuffer->getGrPlatformSurfaceDesc(&drawBufDesc);
    743743            GrTexture* drawBufTex = static_cast<GrTexture*>(gr->createPlatformSurface(drawBufDesc));
     744            // FIXME: This should use a smart pointer.
    744745            SkDeviceFactory* factory = new SkGpuDeviceFactory(gr, drawBufTex);
     746            // FIXME: This should use a smart pointer.
    745747            drawBufTex->unref();
    746748
     749            // FIXME: This should use a smart pointer.
    747750            SkDevice* device = factory->newDevice(m_canvas, SkBitmap::kARGB_8888_Config, drawingBuffer->size().width(), drawingBuffer->size().height(), false, false);
     751            // FIXME: This should use a smart pointer.
    748752            m_canvas->setDevice(device)->unref();
    749753            m_canvas->setDeviceFactory(factory);
Note: See TracChangeset for help on using the changeset viewer.