Changeset 116561 in webkit


Ignore:
Timestamp:
May 9, 2012 3:06:27 PM (12 years ago)
Author:
pilgrim@chromium.org
Message:

[Chromium] Remove PlatformSupport::loadPlatformImageResource, call loadResource directly
https://bugs.webkit.org/show_bug.cgi?id=84417

Reviewed by Adam Barth.

Part of a refactoring series. See tracking bug 82948.

Source/WebCore:

  • WebCore.gyp/WebCore.gyp:
  • WebCore.gypi:
  • platform/chromium/PlatformSupport.h:

(PlatformSupport):

  • platform/graphics/chromium/ImageChromium.cpp:

(WebCore::Image::loadPlatformResource):

  • platform/graphics/chromium/ImageChromiumMac.mm: Removed.

Source/WebKit/chromium:

  • src/PlatformSupport.cpp:

(WebCore):

Location:
trunk/Source
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116557 r116561  
     12012-05-09  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        [Chromium] Remove PlatformSupport::loadPlatformImageResource, call loadResource directly
     4        https://bugs.webkit.org/show_bug.cgi?id=84417
     5
     6        Reviewed by Adam Barth.
     7
     8        Part of a refactoring series. See tracking bug 82948.
     9
     10        * WebCore.gyp/WebCore.gyp:
     11        * WebCore.gypi:
     12        * platform/chromium/PlatformSupport.h:
     13        (PlatformSupport):
     14        * platform/graphics/chromium/ImageChromium.cpp:
     15        (WebCore::Image::loadPlatformResource):
     16        * platform/graphics/chromium/ImageChromiumMac.mm: Removed.
     17
    1182012-05-09  Rob Buis  <rbuis@rim.com>
    219
  • trunk/Source/WebCore/WebCore.gyp/WebCore.gyp

    r116360 r116561  
    16551655            ['include', 'platform/graphics/cg/IntRectCG\\.cpp$'],
    16561656            ['include', 'platform/graphics/cg/IntSizeCG\\.cpp$'],
    1657             ['exclude', 'platform/graphics/chromium/ImageChromiumMac\\.mm$'],
    16581657            ['exclude', 'platform/graphics/mac/FontMac\\.mm$'],
    16591658            ['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
  • trunk/Source/WebCore/WebCore.gypi

    r116549 r116561  
    35693569            'platform/graphics/chromium/ImageBufferDataSkia.h',
    35703570            'platform/graphics/chromium/ImageChromium.cpp',
    3571             'platform/graphics/chromium/ImageChromiumMac.mm',
    35723571            'platform/graphics/chromium/ImageLayerChromium.cpp',
    35733572            'platform/graphics/chromium/ImageLayerChromium.h',
  • trunk/Source/WebCore/platform/chromium/PlatformSupport.h

    r116388 r116561  
    197197
    198198    // Resources ----------------------------------------------------------
    199     static PassRefPtr<Image> loadPlatformImageResource(const char* name);
    200 
    201199#if ENABLE(WEB_AUDIO)
    202200    static PassOwnPtr<AudioBus> decodeAudioFileData(const char* data, size_t, double sampleRate);
  • trunk/Source/WebCore/platform/graphics/chromium/ImageChromium.cpp

    r95901 r116561  
    3030
    3131#include "config.h"
     32#include "BitmapImage.h"
    3233#include "Image.h"
     34#include "SharedBuffer.h"
    3335
    34 #include "PlatformSupport.h"
     36#include <public/Platform.h>
     37#include <public/WebData.h>
    3538
    3639namespace WebCore {
     
    4043PassRefPtr<Image> Image::loadPlatformResource(const char *name)
    4144{
    42     return PlatformSupport::loadPlatformImageResource(name);
     45    const WebKit::WebData& resource = WebKit::Platform::current()->loadResource(name);
     46    if (resource.isEmpty())
     47        return Image::nullImage();
     48
     49    RefPtr<Image> image = BitmapImage::create();
     50    image->setData(resource, true);
     51    return image.release();
    4352}
    4453
  • trunk/Source/WebKit/chromium/ChangeLog

    r116558 r116561  
     12012-05-09  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        [Chromium] Remove PlatformSupport::loadPlatformImageResource, call loadResource directly
     4        https://bugs.webkit.org/show_bug.cgi?id=84417
     5
     6        Reviewed by Adam Barth.
     7
     8        Part of a refactoring series. See tracking bug 82948.
     9
     10        * src/PlatformSupport.cpp:
     11        (WebCore):
     12
    1132012-05-09  Jochen Eisinger  <jochen@chromium.org>
    214
  • trunk/Source/WebKit/chromium/src/PlatformSupport.cpp

    r116388 r116561  
    553553
    554554// Resources ------------------------------------------------------------------
    555 
    556 PassRefPtr<Image> PlatformSupport::loadPlatformImageResource(const char* name)
    557 {
    558     const WebData& resource = webKitPlatformSupport()->loadResource(name);
    559     if (resource.isEmpty())
    560         return Image::nullImage();
    561 
    562     RefPtr<Image> image = BitmapImage::create();
    563     image->setData(resource, true);
    564     return image;
    565 }
    566555
    567556#if ENABLE(WEB_AUDIO)
Note: See TracChangeset for help on using the changeset viewer.