Changeset 149546 in webkit


Ignore:
Timestamp:
May 3, 2013 5:03:05 PM (11 years ago)
Author:
Martin Robinson
Message:

Simplify the #ifdefs in GraphicsContext3D.h
https://bugs.webkit.org/show_bug.cgi?id=115568

Reviewed by Daniel Bates.

  • platform/graphics/GraphicsContext3D.h:

(GraphicsContext3D): Combine #ifdefs paths that have a common
implementation. This reduces the #ifdef paths from many to just three.

  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:

(WebCore::GraphicsContext3D::platformTexture): Move the implementation
here to simplify the header.

  • platform/graphics/efl/GraphicsContext3DEfl.cpp:

(WebCore::GraphicsContext3D::platformTexture): Ditto.
(WebCore):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r149544 r149546  
     12013-05-03  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Simplify the #ifdefs in GraphicsContext3D.h
     4        https://bugs.webkit.org/show_bug.cgi?id=115568
     5
     6        Reviewed by Daniel Bates.
     7
     8        * platform/graphics/GraphicsContext3D.h:
     9        (GraphicsContext3D): Combine #ifdefs paths that have a common
     10        implementation. This reduces the #ifdef paths from many to just three.
     11        * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
     12        (WebCore::GraphicsContext3D::platformTexture): Move the implementation
     13        here to simplify the header.
     14        * platform/graphics/efl/GraphicsContext3DEfl.cpp:
     15        (WebCore::GraphicsContext3D::platformTexture): Ditto.
     16        (WebCore):
     17
    1182013-05-03  Brendan Long  <b.long@cablelabs.com>
    219
  • trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp

    r149031 r149546  
    14721472}
    14731473
     1474#if !PLATFORM(BLACKBERRY) && !PLATFORM(QT) && !PLATFORM(GTK) && !PLATFORM(EFL) && !PLATFORM(MAC)
     1475PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D() const
     1476{
     1477    return NullPlatformGraphicsContext3D;
     1478}
     1479
     1480Platform3DObject GraphicsContext3D::platformTexture() const
     1481{
     1482    return NullPlatform3DObject;
     1483}
     1484
     1485#if USE(ACCELERATED_COMPOSITING)
     1486PlatformLayer* GraphicsContext3D::platformLayer() const
     1487{
     1488    return 0;
     1489}
     1490#endif
     1491#endif
     1492
    14741493} // namespace WebCore
    14751494
  • trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h

    r149193 r149546  
    489489    Platform3DObject platformTexture() const { return m_compositorTexture; }
    490490    CALayer* platformLayer() const { return reinterpret_cast<CALayer*>(m_webGLLayer.get()); }
    491 #elif PLATFORM(BLACKBERRY)
    492     PlatformGraphicsContext3D platformGraphicsContext3D() const;
    493     Platform3DObject platformTexture() const;
    494 #if USE(ACCELERATED_COMPOSITING)
    495     PlatformLayer* platformLayer() const;
    496 #endif
    497 #elif PLATFORM(QT)
     491#else
    498492    PlatformGraphicsContext3D platformGraphicsContext3D();
    499493    Platform3DObject platformTexture() const;
    500 #if USE(ACCELERATED_COMPOSITING)
     494#if USE(ACCELERATED_COMPOSITING) 
    501495    PlatformLayer* platformLayer() const;
    502496#endif
    503 #elif PLATFORM(GTK)
    504     PlatformGraphicsContext3D platformGraphicsContext3D();
    505     Platform3DObject platformTexture() const { return m_texture; }
    506 #if USE(ACCELERATED_COMPOSITING)
    507     PlatformLayer* platformLayer() const;
    508 #endif
    509 #elif PLATFORM(EFL)
    510     PlatformGraphicsContext3D platformGraphicsContext3D();
    511     Platform3DObject platformTexture() const { return m_texture; }
    512 #if USE(ACCELERATED_COMPOSITING)
    513     PlatformLayer* platformLayer() const;
    514 #endif
    515 #else
    516     PlatformGraphicsContext3D platformGraphicsContext3D() const { return NullPlatformGraphicsContext3D; }
    517     Platform3DObject platformTexture() const { return NullPlatform3DObject; }
    518 #if USE(ACCELERATED_COMPOSITING)
    519     PlatformLayer* platformLayer() const { return 0; }
    520 #endif
    521 #endif
     497#endif
     498
    522499    bool makeContextCurrent();
    523500
  • trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp

    r147643 r149546  
    266266    return m_private->makeContextCurrent();
    267267}
     268
    268269PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D()
    269270{
    270271    return m_private->platformContext();
     272}
     273
     274Platform3DObject GraphicsContext3D::platformTexture() const
     275{
     276    return m_texture;
    271277}
    272278
  • trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp

    r147643 r149546  
    171171}
    172172
     173Platform3DObject GraphicsContext3D::platformTexture() const
     174{
     175    return m_texture;
     176}
     177
    173178#if USE(ACCELERATED_COMPOSITING)
    174179PlatformLayer* GraphicsContext3D::platformLayer() const
Note: See TracChangeset for help on using the changeset viewer.