Changeset 153843 in webkit


Ignore:
Timestamp:
Aug 8, 2013, 1:19:27 PM (12 years ago)
Author:
achristensen@apple.com
Message:

Work towards WebGL on AppleWin port.
https://bugs.webkit.org/show_bug.cgi?id=119562

Reviewed by Brent Fulgham.

  • WebCore.vcxproj/WebCore.vcxproj:

Build GLContext.cpp and GraphicsContext3DPrivate.cpp on AppleWin port.

  • WebCore.vcxproj/WebCore.vcxproj.filters:

Moved GLContext and GraphicsContext3DPrivate from Cairo filter to graphics.

  • platform/graphics/GraphicsContext3D.h:

Added m_webGLLayer for AppleWin port.

  • platform/graphics/GraphicsContext3DPrivate.cpp:

Protected inclusion of PlatformContextCairo.h in USE(CAIRO) macro for non-cairo ports.

  • platform/graphics/win/GraphicsContext3DWin.cpp:

Removed stub GraphicsContext3DPrivate implementation in favor of GraphicsContext3DPrivate.cpp.
(WebCore::GraphicsContext3D::GraphicsContext3D):
Added GraphicsContext3DPrivate and PlatformCALayer initialization.
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::platformGraphicsContext3D):
Added implementation based on Cairo ports' to be refactored soon.
(WebCore::GraphicsContext3D::platformLayer):
Return PlatformCALayer's PlatformLayer instead of 0.

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r153838 r153843  
     12013-08-08  Alex Christensen  <achristensen@apple.com>
     2
     3        Work towards WebGL on AppleWin port.
     4        https://bugs.webkit.org/show_bug.cgi?id=119562
     5
     6        Reviewed by Brent Fulgham.
     7
     8        * WebCore.vcxproj/WebCore.vcxproj:
     9        Build GLContext.cpp and GraphicsContext3DPrivate.cpp on AppleWin port.
     10        * WebCore.vcxproj/WebCore.vcxproj.filters:
     11        Moved GLContext and GraphicsContext3DPrivate from Cairo filter to graphics.
     12        * platform/graphics/GraphicsContext3D.h:
     13        Added m_webGLLayer for AppleWin port.
     14        * platform/graphics/GraphicsContext3DPrivate.cpp:
     15        Protected inclusion of PlatformContextCairo.h in USE(CAIRO) macro for non-cairo ports.
     16        * platform/graphics/win/GraphicsContext3DWin.cpp:
     17        Removed stub GraphicsContext3DPrivate implementation in favor of GraphicsContext3DPrivate.cpp.
     18        (WebCore::GraphicsContext3D::GraphicsContext3D):
     19        Added GraphicsContext3DPrivate and PlatformCALayer initialization.
     20        (WebCore::GraphicsContext3D::makeContextCurrent):
     21        (WebCore::GraphicsContext3D::platformGraphicsContext3D):
     22        Added implementation based on Cairo ports' to be refactored soon.
     23        (WebCore::GraphicsContext3D::platformLayer):
     24        Return PlatformCALayer's PlatformLayer instead of 0.
     25
    1262013-08-08  Jer Noble  <jer.noble@apple.com>
    227
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r153785 r153843  
    73417341    <ClCompile Include="..\platform\graphics\avfoundation\cf\InbandTextTrackPrivateLegacyAVCF.cpp" />
    73427342    <ClCompile Include="..\platform\graphics\avfoundation\InbandTextTrackPrivateAVF.cpp" />
    7343     <ClCompile Include="..\platform\graphics\GLContext.cpp">
    7344       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    7345       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    7346       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
    7347       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    7348       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
    7349       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    7350     </ClCompile>
     7343    <ClCompile Include="..\platform\graphics\GLContext.cpp" />
    73517344    <ClCompile Include="..\platform\graphics\cairo\GraphicsContext3DCairo.cpp">
    73527345      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     
    73577350      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    73587351    </ClCompile>
    7359     <ClCompile Include="..\platform\graphics\GraphicsContext3DPrivate.cpp">
    7360       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    7361       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    7362       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
    7363       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    7364       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
    7365       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    7366     </ClCompile>
     7352    <ClCompile Include="..\platform\graphics\GraphicsContext3DPrivate.cpp" />
    73677353    <ClCompile Include="..\platform\graphics\ca\win\PlatformCAFiltersWin.cpp" />
    73687354    <ClCompile Include="..\platform\graphics\cg\GraphicsContext3DCG.cpp">
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

    r153772 r153843  
    70317031      <Filter>platform\graphics\cairo</Filter>
    70327032    </ClCompile>
    7033     <ClCompile Include="..\platform\graphics\GraphicsContext3DPrivate.cpp">
    7034       <Filter>platform\graphics\cairo</Filter>
    7035     </ClCompile>
    70367033    <ClCompile Include="..\html\canvas\CanvasContextAttributes.cpp">
    70377034      <Filter>html\canvas</Filter>
    7038     </ClCompile>
    7039     <ClCompile Include="..\platform\graphics\GLContext.cpp">
    7040       <Filter>platform\graphics\cairo</Filter>
    70417035    </ClCompile>
    70427036    <ClCompile Include="..\platform\graphics\opengl\GraphicsContext3DOpenGLES.cpp">
     
    70587052    <ClCompile Include="..\platform\graphics\win\GraphicsContext3DWin.cpp">
    70597053      <Filter>platform\graphics\win</Filter>
     7054    </ClCompile>
     7055    <ClCompile Include="..\platform\graphics\GraphicsContext3DPrivate.cpp">
     7056      <Filter>platform\graphics</Filter>
     7057    </ClCompile>
     7058    <ClCompile Include="..\platform\graphics\GLContext.cpp">
     7059      <Filter>platform\graphics</Filter>
    70607060    </ClCompile>
    70617061  </ItemGroup>
     
    1477914779      <Filter>page</Filter>
    1478014780    </ClInclude>
    14781     <ClInclude Include="..\platform\graphics\GraphicsContext3DPrivate.h">
    14782       <Filter>platform\graphics\cairo</Filter>
    14783     </ClInclude>
    1478414781    <ClInclude Include="..\html\canvas\CanvasContextAttributes.h">
    1478514782      <Filter>html\canvas</Filter>
    1478614783    </ClInclude>
    14787     <ClInclude Include="..\platform\graphics\GLContext.h">
    14788       <Filter>platform\graphics\cairo</Filter>
    14789     </ClInclude>
    1479014784    <ClInclude Include="..\platform\graphics\egl\GLContextEGL.h">
    1479114785      <Filter>platform\graphics\egl</Filter>
     
    1480114795    </ClInclude>
    1480214796    <ClInclude Include="..\platform\graphics\MediaPlayerPrivate.h">
     14797      <Filter>platform\graphics</Filter>
     14798    </ClInclude>
     14799    <ClInclude Include="..\platform\graphics\GraphicsContext3DPrivate.h">
     14800      <Filter>platform\graphics</Filter>
     14801    </ClInclude>
     14802    <ClInclude Include="..\platform\graphics\GLContext.h">
    1480314803      <Filter>platform\graphics</Filter>
    1480414804    </ClInclude>
  • trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h

    r153042 r153843  
    3838#include <wtf/RefCounted.h>
    3939#include <wtf/text/WTFString.h>
     40
     41#if USE(CA)
     42#include "PlatformCALayer.h"
     43#endif
    4044
    4145// FIXME: Find a better way to avoid the name confliction for NO_ERROR.
     
    951955    CGLContextObj m_contextObj;
    952956    RetainPtr<WebGLLayer> m_webGLLayer;
     957#elif PLATFORM(WIN) && USE(CA)
     958    RefPtr<PlatformCALayer> m_webGLLayer;
    953959#elif PLATFORM(BLACKBERRY)
    954960#if USE(ACCELERATED_COMPOSITING)
  • trunk/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp

    r153766 r153843  
    2525#include "HostWindow.h"
    2626#include "NotImplemented.h"
     27#include <wtf/OwnArrayPtr.h>
     28
     29#if USE(CAIRO)
    2730#include "PlatformContextCairo.h"
    28 #include <wtf/OwnArrayPtr.h>
     31#endif
    2932
    3033#if USE(OPENGL_ES_2)
  • trunk/Source/WebCore/platform/graphics/win/GraphicsContext3DWin.cpp

    r153441 r153843  
    2828#if USE(3D_GRAPHICS)
    2929
     30#include "GraphicsContext3DPrivate.h"
    3031#include <wtf/NotFound.h>
    3132#include <wtf/OwnPtr.h>
     
    4647
    4748namespace WebCore {
    48 
    49 // FIXME: This class is currently empty on Windows, but will get populated as
    50 // the restructuring in https://bugs.webkit.org/show_bug.cgi?id=66903 is done
    51 class GraphicsContext3DPrivate {
    52 public:
    53     GraphicsContext3DPrivate(GraphicsContext3D*) { }
    54    
    55     ~GraphicsContext3DPrivate() { }
    56 };
    5749
    5850PassRefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attributes, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
     
    8880    , m_multisampleDepthStencilBuffer(0)
    8981    , m_multisampleColorBuffer(0)
     82    , m_private(GraphicsContext3DPrivate::create(this, renderStyle))
    9083{
    9184    makeContextCurrent();
    9285
    9386    validateAttributes();
     87
     88#if USE(CA)
     89    m_webGLLayer = PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, 0);
     90#endif
    9491
    9592    if (renderStyle == RenderOffscreen) {
     
    177174bool GraphicsContext3D::makeContextCurrent()
    178175{
    179     return false;
     176    if (!m_private)
     177        return false;
     178    return m_private->makeContextCurrent();
    180179}
    181180
    182181PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D()
    183182{
    184     return 0;
     183    return m_private->platformContext();
    185184}
    186185
     
    202201PlatformLayer* GraphicsContext3D::platformLayer() const
    203202{
    204     return 0;
     203    return m_webGLLayer->platformLayer();
    205204}
    206205#endif
Note: See TracChangeset for help on using the changeset viewer.