Changeset 125203 in webkit


Ignore:
Timestamp:
Aug 9, 2012 2:25:32 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Extract the definition of NativeImagePtr from ImageSource.h into NativeImagePtr.h.
https://bugs.webkit.org/show_bug.cgi?id=93466

Patch by Huang Dongsung <luxtella@company100.net> on 2012-08-09
Reviewed by Adam Barth.

Image.h includes ImageSource.h in order to know the definition of NativeImagePtr.
But Image does not need to know the definition of ImageSource. So, this patch
extracts the definition of NativeImagePtr from ImageSource.h into NativeImagePtr.h.

This is a preparation for asynchronous image decoding. Async decoding
will need a callback function, which sends a NativeImagePtr to clients, and the
callback must know the definition of NativeImagePtr, not ImageSource.

No new tests, behavior is unchanged.

  • GNUmakefile.list.am:
  • Target.pri:
  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/BitmapImage.h:
  • platform/graphics/Image.h:
  • platform/graphics/ImageSource.h:

(WebCore):

  • platform/graphics/NativeImagePtr.h: Added.

(WebCore):

Location:
trunk/Source/WebCore
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r125202 r125203  
     12012-08-09  Huang Dongsung  <luxtella@company100.net>
     2
     3        Extract the definition of NativeImagePtr from ImageSource.h into NativeImagePtr.h.
     4        https://bugs.webkit.org/show_bug.cgi?id=93466
     5
     6        Reviewed by Adam Barth.
     7
     8        Image.h includes ImageSource.h in order to know the definition of NativeImagePtr.
     9        But Image does not need to know the definition of ImageSource. So, this patch
     10        extracts the definition of NativeImagePtr from ImageSource.h into NativeImagePtr.h.
     11
     12        This is a preparation for asynchronous image decoding. Async decoding
     13        will need a callback function, which sends a NativeImagePtr to clients, and the
     14        callback must know the definition of NativeImagePtr, not ImageSource.
     15
     16        No new tests, behavior is unchanged.
     17
     18        * GNUmakefile.list.am:
     19        * Target.pri:
     20        * WebCore.gypi:
     21        * WebCore.vcproj/WebCore.vcproj:
     22        * WebCore.xcodeproj/project.pbxproj:
     23        * platform/graphics/BitmapImage.h:
     24        * platform/graphics/Image.h:
     25        * platform/graphics/ImageSource.h:
     26        (WebCore):
     27        * platform/graphics/NativeImagePtr.h: Added.
     28        (WebCore):
     29
    1302012-08-09  Robert Hogan  <robert@webkit.org>
    231
  • trunk/Source/WebCore/GNUmakefile.list.am

    r125145 r125203  
    32423242        Source/WebCore/platform/graphics/DashArray.h \
    32433243        Source/WebCore/platform/graphics/Extensions3D.h \
     3244        Source/WebCore/platform/graphics/NativeImagePtr.h \
    32443245        Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp \
    32453246        Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp \
  • trunk/Source/WebCore/Target.pri

    r125145 r125203  
    20872087    platform/graphics/IntRect.h \
    20882088    platform/graphics/MediaPlayer.h \
     2089    platform/graphics/NativeImagePtr.h \
    20892090    platform/graphics/opentype/OpenTypeVerticalData.h \
    20902091    platform/graphics/Path.h \
  • trunk/Source/WebCore/WebCore.gypi

    r125201 r125203  
    35333533            'platform/graphics/MediaPlayer.cpp',
    35343534            'platform/graphics/MediaPlayerPrivate.h',
     3535            'platform/graphics/NativeImagePtr.h' ,
    35353536            'platform/graphics/Path.cpp',
    35363537            'platform/graphics/PathTraversalState.cpp',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r125201 r125203  
    2955029550                                        >
    2955129551                                </File>
     29552                                <File
     29553                                        RelativePath="..\platform\graphics\NativeImagePtr.h"
     29554                                        >
     29555                                </File>
    2955229556                                <File
    2955329557                                        RelativePath="..\platform\graphics\Path.cpp"
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r125145 r125203  
    48274827                B27535750B053814002CE64F /* IntSize.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535470B053814002CE64F /* IntSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
    48284828                B27535760B053814002CE64F /* IntSizeHash.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535480B053814002CE64F /* IntSizeHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
     4829                6B3480940EEF50D400AC1B41 /* NativeImagePtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3480920EEF50D400AC1B41 /* NativeImagePtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
    48294830                B27535770B053814002CE64F /* ColorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354A0B053814002CE64F /* ColorMac.mm */; };
    48304831                B27535780B053814002CE64F /* FloatPointMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354B0B053814002CE64F /* FloatPointMac.mm */; };
     
    1206412065                B27535470B053814002CE64F /* IntSize.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntSize.h; sourceTree = "<group>"; };
    1206512066                B27535480B053814002CE64F /* IntSizeHash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntSizeHash.h; sourceTree = "<group>"; };
     12067                6B3480920EEF50D400AC1B41 /* NativeImagePtr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NativeImagePtr.h; sourceTree = "<group>"; };
    1206612068                B275354A0B053814002CE64F /* ColorMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ColorMac.mm; sourceTree = "<group>"; };
    1206712069                B275354B0B053814002CE64F /* FloatPointMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FloatPointMac.mm; sourceTree = "<group>"; };
     
    1983319835                                E4B41E0D0CBF90BD00AF2ECE /* MediaPlayer.h */,
    1983419836                                079F5E4B0F3BEBEA005E0782 /* MediaPlayerPrivate.h */,
     19837                                6B3480920EEF50D400AC1B41 /* NativeImagePtr.h */,
    1983519838                                B27535520B053814002CE64F /* Path.cpp */,
    1983619839                                B27535530B053814002CE64F /* Path.h */,
     
    2432724330                                A81872230977D3C0005826D9 /* NamedNodeMap.h in Headers */,
    2432824331                                A818721E0977D3C0005826D9 /* NameNodeList.h in Headers */,
     24332                                6B3480940EEF50D400AC1B41 /* NativeImagePtr.h in Headers */,
    2432924333                                E10B9B6C0B747599003ED890 /* NativeXPathNSResolver.h in Headers */,
    2433024334                                93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */,
  • trunk/Source/WebCore/platform/graphics/BitmapImage.h

    r125145 r125203  
    3232#include "Color.h"
    3333#include "ImageOrientation.h"
     34#include "ImageSource.h"
    3435#include "IntSize.h"
    3536
  • trunk/Source/WebCore/platform/graphics/Image.h

    r125145 r125203  
    3131#include "ColorSpace.h"
    3232#include "GraphicsTypes.h"
    33 #include "ImageSource.h"
     33#include "ImageOrientation.h"
    3434#include "IntRect.h"
     35#include "NativeImagePtr.h"
    3536#include <wtf/PassRefPtr.h>
    3637#include <wtf/RefCounted.h>
  • trunk/Source/WebCore/platform/graphics/ImageSource.h

    r125145 r125203  
    2929
    3030#include "ImageOrientation.h"
     31#include "NativeImagePtr.h"
    3132
    3233#include <wtf/Forward.h>
     
    3435#include <wtf/Vector.h>
    3536
    36 #if PLATFORM(WX)
    37 class wxBitmap;
    38 class wxGraphicsBitmap;
    39 #elif USE(CG)
     37#if USE(CG)
    4038typedef struct CGImageSource* CGImageSourceRef;
    41 typedef struct CGImage* CGImageRef;
    4239typedef const struct __CFData* CFDataRef;
    43 #elif PLATFORM(QT)
    44 #include <qglobal.h>
    45 QT_BEGIN_NAMESPACE
    46 class QImage;
    47 QT_END_NAMESPACE
    48 #elif USE(CAIRO)
    49 #include "NativeImageCairo.h"
    50 #elif USE(SKIA)
    51 namespace WebCore {
    52 class NativeImageSkia;
    53 }
    54 #elif OS(WINCE)
    55 #include "SharedBitmap.h"
    5640#endif
    5741
     
    6549#if USE(CG)
    6650typedef CGImageSourceRef NativeImageSourcePtr;
    67 typedef CGImageRef NativeImagePtr;
    68 #elif PLATFORM(OPENVG)
    69 class ImageDecoder;
    70 class TiledImageOpenVG;
    71 typedef ImageDecoder* NativeImageSourcePtr;
    72 typedef TiledImageOpenVG* NativeImagePtr;
    7351#else
    7452class ImageDecoder;
    7553typedef ImageDecoder* NativeImageSourcePtr;
    76 #if PLATFORM(WX)
    77 #if USE(WXGC)
    78 typedef wxGraphicsBitmap* NativeImagePtr;
    79 #else
    80 typedef wxBitmap* NativeImagePtr;
    81 #endif
    82 #elif USE(CAIRO)
    83 typedef WebCore::NativeImageCairo* NativeImagePtr;
    84 #elif USE(SKIA)
    85 typedef WebCore::NativeImageSkia* NativeImagePtr;
    86 #elif OS(WINCE)
    87 typedef RefPtr<SharedBitmap> NativeImagePtr;
    88 #elif PLATFORM(BLACKBERRY)
    89 class ImageDecoder;
    90 typedef ImageDecoder* NativeImageSourcePtr;
    91 typedef void* NativeImagePtr;
    92 #elif PLATFORM(QT)
    93 typedef QImage* NativeImagePtr;
    94 #endif
    9554#endif
    9655
  • trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp

    r125145 r125203  
    3434#include "GraphicsContext3DPrivate.h"
    3535#include "Image.h"
     36#include "ImageSource.h"
    3637#include "NotImplemented.h"
    3738#include "OpenGLShims.h"
Note: See TracChangeset for help on using the changeset viewer.