Changeset 116666 in webkit


Ignore:
Timestamp:
May 10, 2012 11:25:52 AM (12 years ago)
Author:
pilgrim@chromium.org
Message:

[Chromium] Remove dead code behind unused WEBKIT_USING_CG
https://bugs.webkit.org/show_bug.cgi?id=86018

Reviewed by Adam Barth.

We never use CoreGraphics as the backend for GraphicsContext in
Chromium, so this is all dead code.

Source/Platform:

  • chromium/public/WebCanvas.h:

(WebKit):

  • chromium/public/WebImage.h:

(WebImage):

Source/WebKit/chromium:

  • README:
  • src/PageOverlay.cpp:
  • src/WebContentLayerImpl.cpp:

(WebKit::WebContentLayerImpl::paintContents):

  • src/WebFontImpl.cpp:

(WebKit::WebFontImpl::drawText):

  • src/WebImageDecoder.cpp:

(WebKit::WebImageDecoder::getFrameAtIndex):

  • src/WebPluginContainerImpl.cpp:

(WebKit::WebPluginContainerImpl::paint):
(WebKit::WebPluginContainerImpl::printPage):

  • src/painting/GraphicsContextBuilder.h:

(WebKit):

Location:
trunk/Source
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/Platform/ChangeLog

    r116566 r116666  
     12012-05-10  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        [Chromium] Remove dead code behind unused WEBKIT_USING_CG
     4        https://bugs.webkit.org/show_bug.cgi?id=86018
     5
     6        Reviewed by Adam Barth.
     7
     8        We never use CoreGraphics as the backend for GraphicsContext in
     9        Chromium, so this is all dead code.
     10
     11        * chromium/public/WebCanvas.h:
     12        (WebKit):
     13        * chromium/public/WebImage.h:
     14        (WebImage):
     15
    1162012-05-09  Mark Pilgrim  <pilgrim@chromium.org>
    217
  • trunk/Source/Platform/chromium/public/WebCanvas.h

    r108829 r116666  
    3636#if WEBKIT_USING_SKIA
    3737class SkCanvas;
    38 #elif WEBKIT_USING_CG
    39 struct CGContext;
    4038#endif
    4139
     
    4442#if WEBKIT_USING_SKIA
    4543typedef SkCanvas WebCanvas;
    46 #elif WEBKIT_USING_CG
    47 typedef struct CGContext WebCanvas;
    4844#else
    4945#error "Need to define WebCanvas"
  • trunk/Source/Platform/chromium/public/WebImage.h

    r116566 r116666  
    3636#if WEBKIT_USING_SKIA
    3737#include <SkBitmap.h>
    38 #elif WEBKIT_USING_CG
    39 typedef struct CGImage* CGImageRef;
    4038#endif
    4139
     
    10098    SkBitmap m_bitmap;
    10199
    102 #elif WEBKIT_USING_CG
    103     WebImage(CGImageRef imageRef)
    104     {
    105         init();
    106         assign(imageRef);
    107     }
    108 
    109     WebImage& operator=(CGImageRef imageRef)
    110     {
    111         assign(imageRef);
    112         return *this;
    113     }
    114 
    115     CGImageRef getCGImageRef() const { return m_imageRef; }
    116 
    117 private:
    118     void init() { m_imageRef = 0; }
    119     WEBKIT_EXPORT void assign(CGImageRef);
    120     CGImageRef m_imageRef;
    121100#endif
    122101};
  • trunk/Source/WebKit/chromium/ChangeLog

    r116641 r116666  
     12012-05-10  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        [Chromium] Remove dead code behind unused WEBKIT_USING_CG
     4        https://bugs.webkit.org/show_bug.cgi?id=86018
     5
     6        Reviewed by Adam Barth.
     7
     8        We never use CoreGraphics as the backend for GraphicsContext in
     9        Chromium, so this is all dead code.
     10
     11        * README:
     12        * src/PageOverlay.cpp:
     13        * src/WebContentLayerImpl.cpp:
     14        (WebKit::WebContentLayerImpl::paintContents):
     15        * src/WebFontImpl.cpp:
     16        (WebKit::WebFontImpl::drawText):
     17        * src/WebImageDecoder.cpp:
     18        (WebKit::WebImageDecoder::getFrameAtIndex):
     19        * src/WebPluginContainerImpl.cpp:
     20        (WebKit::WebPluginContainerImpl::paint):
     21        (WebKit::WebPluginContainerImpl::printPage):
     22        * src/painting/GraphicsContextBuilder.h:
     23        (WebKit):
     24
    1252012-05-10  Sam D  <dsam2912@gmail.com>
    226
  • trunk/Source/WebKit/chromium/README

    r92322 r116666  
    3838  WEBKIT_USING_SKIA is defined when using Skia as the graphics library.
    3939
    40   WEBKIT_USING_CG is defined when using CG as the graphics library.
    41 
    4240  WEBKIT_USING_V8 is defined when using V8 as the JavaScript library.
    4341
  • trunk/Source/WebKit/chromium/src/PageOverlay.cpp

    r105757 r116666  
    4949#if WEBKIT_USING_SKIA
    5050    return gc->platformContext()->canvas();
    51 #elif WEBKIT_USING_CG
    52     return gc->platformContext();
    5351#endif
    5452}
  • trunk/Source/WebKit/chromium/src/WebContentLayerImpl.cpp

    r116142 r116666  
    6767#if WEBKIT_USING_SKIA
    6868    WebCanvas* canvas = gc.platformContext()->canvas();
    69 #elif WEBKIT_USING_CG
    70     WebCanvas* canvas = gc.platformContext();
    7169#endif
    7270    m_contentClient->paintContents(canvas, WebRect(clip));
  • trunk/Source/WebKit/chromium/src/WebFontImpl.cpp

    r113345 r116666  
    102102#if WEBKIT_USING_SKIA
    103103    gc.platformContext()->setDrawingToImageBuffer(!canvasIsOpaque);
    104 #elif WEBKIT_USING_CG
    105     // FIXME hook canvasIsOpaque up to the platform-specific indicators for
    106     // whether subpixel AA can be used for this draw.
    107104#endif
    108105
  • trunk/Source/WebKit/chromium/src/WebImageDecoder.cpp

    r116566 r116666  
    116116    OwnPtr<NativeImageSkia> image = adoptPtr(frameBuffer->asNewNativeImage());
    117117    return WebImage(image->bitmap());
    118 #elif WEBKIT_USING_CG
    119     // FIXME: Implement CG side of this.
    120     return WebImage(frameBuffer->asNewNativeImage());
    121118#endif
    122119}
  • trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp

    r116566 r116666  
    129129#if WEBKIT_USING_SKIA
    130130    WebCanvas* canvas = gc->platformContext()->canvas();
    131 #elif WEBKIT_USING_CG
    132     WebCanvas* canvas = gc->platformContext();
    133131#endif
    134132
     
    262260#if WEBKIT_USING_SKIA
    263261    WebCanvas* canvas = gc->platformContext()->canvas();
    264 #elif WEBKIT_USING_CG
    265     WebCanvas* canvas = gc->platformContext();
    266262#endif
    267263    bool ret = m_webPlugin->printPage(pageNumber, canvas);
  • trunk/Source/WebKit/chromium/src/painting/GraphicsContextBuilder.h

    r95901 r116666  
    3434#include "GraphicsContext.h"
    3535
    36 #if WEBKIT_USING_CG
    37 #include "LocalCurrentGraphicsContext.h"
    38 #elif WEBKIT_USING_SKIA
     36#if WEBKIT_USING_SKIA
    3937#include "PlatformContextSkia.h"
    4038#endif
     
    4240namespace WebKit {
    4341
    44 #if WEBKIT_USING_CG
    45 
    46 class GraphicsContextBuilder {
    47 public:
    48     GraphicsContextBuilder(WebCanvas* canvas)
    49         : m_graphicsContext(canvas)
    50         , m_localContext(&m_graphicsContext)
    51     {
    52     }
    53 
    54     WebCore::GraphicsContext& context() { return m_graphicsContext; }
    55 
    56 private:
    57     WebCore::GraphicsContext m_graphicsContext;
    58     WebCore::LocalCurrentGraphicsContext m_localContext;
    59 };
    60 
    61 #elif WEBKIT_USING_SKIA
     42#if WEBKIT_USING_SKIA
    6243
    6344class GraphicsContextBuilder {
Note: See TracChangeset for help on using the changeset viewer.