Changeset 125143 in webkit


Ignore:
Timestamp:
Aug 8, 2012 7:35:43 PM (12 years ago)
Author:
kseo@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-08
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

    r125142 r125143  
     12012-08-08  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-08  Shane Stephens  <shanestephens@google.com>
    231
  • trunk/Source/WebCore/GNUmakefile.list.am

    r125042 r125143  
    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

    r125042 r125143  
    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

    r125061 r125143  
    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

    r125025 r125143  
    2955129551                                </File>
    2955229552                                <File
     29553                                        RelativePath="..\platform\graphics\NativeImagePtr.h"
     29554                                        >
     29555                                </File>
     29556                                <File
    2955329557                                        RelativePath="..\platform\graphics\Path.cpp"
    2955429558                                        >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r125074 r125143  
    14301430                4B3480930EEF50D400AC1B41 /* ImageSourceCGMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B3480910EEF50D400AC1B41 /* ImageSourceCGMac.mm */; };
    14311431                4B3480940EEF50D400AC1B41 /* ImageSourceCG.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3480920EEF50D400AC1B41 /* ImageSourceCG.h */; };
     1432                6B3480940EEF50D400AC1B41 /* NativeImagePtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3480920EEF50D400AC1B41 /* NativeImagePtr.h */; };
    14321433                4B6FA6F40C39E48C00087011 /* SmartReplace.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6FA6F20C39E48C00087011 /* SmartReplace.h */; settings = {ATTRIBUTES = (Private, ); }; };
    14331434                4B6FA6F50C39E48C00087011 /* SmartReplace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6FA6F30C39E48C00087011 /* SmartReplace.cpp */; };
     
    85608561                4B3480910EEF50D400AC1B41 /* ImageSourceCGMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ImageSourceCGMac.mm; sourceTree = "<group>"; };
    85618562                4B3480920EEF50D400AC1B41 /* ImageSourceCG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageSourceCG.h; sourceTree = "<group>"; };
     8563                6B3480920EEF50D400AC1B41 /* NativeImagePtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeImagePtr.h; sourceTree = "<group>"; };
    85628564                4B6FA6F20C39E48C00087011 /* SmartReplace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmartReplace.h; sourceTree = "<group>"; };
    85638565                4B6FA6F30C39E48C00087011 /* SmartReplace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SmartReplace.cpp; sourceTree = "<group>"; };
     
    1967419676                                B27535330B053814002CE64F /* IntRectCG.cpp */,
    1967519677                                B27535340B053814002CE64F /* IntSizeCG.cpp */,
     19678                                6B3480920EEF50D400AC1B41 /* NativeImagePtr.h */,
    1967619679                                B27535350B053814002CE64F /* PathCG.cpp */,
    1967719680                                A80A38FD0E50CC8200A25EBC /* PatternCG.cpp */,
     
    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

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

    r122720 r125143  
    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

    r122726 r125143  
    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

    r122250 r125143  
    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.