<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[212705] releases/WebKitGTK/webkit-2.16/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/212705">212705</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2017-02-21 00:38:29 -0800 (Tue, 21 Feb 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/212638">r212638</a> - Remove code under USE(GRAPHICS_SURFACE)
https://bugs.webkit.org/show_bug.cgi?id=168592
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-02-20
Reviewed by Michael Catanzaro.
This was only used by EFL port.
Source/WebCore:
* platform/TextureMapper.cmake:
* platform/graphics/opengl/GLPlatformSurface.cpp: Removed.
* platform/graphics/surfaces/GLTransportSurface.cpp: Removed.
* platform/graphics/surfaces/GLTransportSurface.h: Removed.
* platform/graphics/surfaces/GraphicsSurface.cpp: Removed.
* platform/graphics/surfaces/GraphicsSurface.h: Removed.
* platform/graphics/surfaces/GraphicsSurfaceToken.h: Removed.
* platform/graphics/surfaces/egl/EGLConfigSelector.cpp: Removed.
* platform/graphics/surfaces/egl/EGLConfigSelector.h: Removed.
* platform/graphics/surfaces/egl/EGLContext.cpp: Removed.
* platform/graphics/surfaces/egl/EGLContext.h: Removed.
* platform/graphics/surfaces/egl/EGLHelper.cpp: Removed.
* platform/graphics/surfaces/egl/EGLHelper.h: Removed.
* platform/graphics/surfaces/egl/EGLSurface.cpp: Removed.
* platform/graphics/surfaces/egl/EGLSurface.h: Removed.
* platform/graphics/surfaces/egl/EGLXSurface.cpp: Removed.
* platform/graphics/surfaces/egl/EGLXSurface.h: Removed.
* platform/graphics/surfaces/glx/GLXConfigSelector.h: Removed.
* platform/graphics/surfaces/glx/GLXContext.cpp: Removed.
* platform/graphics/surfaces/glx/GLXContext.h: Removed.
* platform/graphics/surfaces/glx/GLXSurface.cpp: Removed.
* platform/graphics/surfaces/glx/GLXSurface.h: Removed.
* platform/graphics/surfaces/glx/X11Helper.cpp: Removed.
* platform/graphics/surfaces/glx/X11Helper.h: Removed.
* platform/graphics/texmap/TextureMapperBackingStore.cpp:
* platform/graphics/texmap/TextureMapperBackingStore.h:
* platform/graphics/texmap/TextureMapperPlatformLayer.h:
(WebCore::TextureMapperPlatformLayer::setClient):
* platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: Removed.
* platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: Removed.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
Source/WebKit2:
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
(IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
(WebKit::CoordinatedGraphicsScene::deleteLayer):
(WebKit::CoordinatedGraphicsScene::assignImageBackingToLayer):
(WebKit::CoordinatedGraphicsScene::purgeGLResources):
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
(WebKit::WebCoordinatedSurface::Handle::encode):
(WebKit::WebCoordinatedSurface::Handle::decode):
(WebKit::WebCoordinatedSurface::create):
(WebKit::WebCoordinatedSurface::createGraphicsContext):
(WebKit::WebCoordinatedSurface::createHandle):
(WebKit::WebCoordinatedSurface::copyToTexture):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformTextureMappercmake">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/TextureMapper.cmake</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapTextureMapperBackingStorecpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapTextureMapperBackingStoreh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapTextureMapperPlatformLayerh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayercpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayerh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsStateh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebKit2ChangeLog">releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsCoordinatedGraphicsArgumentCoderscpp">releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsCoordinatedGraphicsArgumentCodersh">releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsCoordinatedGraphicsScenecpp">releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsCoordinatedGraphicsSceneh">releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsWebCoordinatedSurfacecpp">releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsWebCoordinatedSurfaceh">releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicsopenglGLPlatformSurfacecpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesGLTransportSurfacecpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesGLTransportSurfaceh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesGraphicsSurfacecpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurface.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesGraphicsSurfaceh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesGraphicsSurfaceTokenh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLConfigSelectorcpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLConfigSelector.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLConfigSelectorh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLConfigSelector.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLContextcpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLContext.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLContexth">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLContext.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLHelpercpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLHelperh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLSurfacecpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLSurfaceh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLXSurfacecpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLXSurface.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLXSurfaceh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLXSurface.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxGLXConfigSelectorh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXConfigSelector.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxGLXContextcpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXContext.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxGLXContexth">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXContext.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxGLXSurfacecpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxGLXSurfaceh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxX11Helpercpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxX11Helperh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/X11Helper.h</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapTextureMapperSurfaceBackingStorecpp">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapTextureMapperSurfaceBackingStoreh">releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit216SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,3 +1,51 @@
</span><ins>+2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Remove code under USE(GRAPHICS_SURFACE)
+ https://bugs.webkit.org/show_bug.cgi?id=168592
+
+ Reviewed by Michael Catanzaro.
+
+ This was only used by EFL port.
+
+ * platform/TextureMapper.cmake:
+ * platform/graphics/opengl/GLPlatformSurface.cpp: Removed.
+ * platform/graphics/surfaces/GLTransportSurface.cpp: Removed.
+ * platform/graphics/surfaces/GLTransportSurface.h: Removed.
+ * platform/graphics/surfaces/GraphicsSurface.cpp: Removed.
+ * platform/graphics/surfaces/GraphicsSurface.h: Removed.
+ * platform/graphics/surfaces/GraphicsSurfaceToken.h: Removed.
+ * platform/graphics/surfaces/egl/EGLConfigSelector.cpp: Removed.
+ * platform/graphics/surfaces/egl/EGLConfigSelector.h: Removed.
+ * platform/graphics/surfaces/egl/EGLContext.cpp: Removed.
+ * platform/graphics/surfaces/egl/EGLContext.h: Removed.
+ * platform/graphics/surfaces/egl/EGLHelper.cpp: Removed.
+ * platform/graphics/surfaces/egl/EGLHelper.h: Removed.
+ * platform/graphics/surfaces/egl/EGLSurface.cpp: Removed.
+ * platform/graphics/surfaces/egl/EGLSurface.h: Removed.
+ * platform/graphics/surfaces/egl/EGLXSurface.cpp: Removed.
+ * platform/graphics/surfaces/egl/EGLXSurface.h: Removed.
+ * platform/graphics/surfaces/glx/GLXConfigSelector.h: Removed.
+ * platform/graphics/surfaces/glx/GLXContext.cpp: Removed.
+ * platform/graphics/surfaces/glx/GLXContext.h: Removed.
+ * platform/graphics/surfaces/glx/GLXSurface.cpp: Removed.
+ * platform/graphics/surfaces/glx/GLXSurface.h: Removed.
+ * platform/graphics/surfaces/glx/X11Helper.cpp: Removed.
+ * platform/graphics/surfaces/glx/X11Helper.h: Removed.
+ * platform/graphics/texmap/TextureMapperBackingStore.cpp:
+ * platform/graphics/texmap/TextureMapperBackingStore.h:
+ * platform/graphics/texmap/TextureMapperPlatformLayer.h:
+ (WebCore::TextureMapperPlatformLayer::setClient):
+ * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: Removed.
+ * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: Removed.
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
+ (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
+ (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
+ (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
+ (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
+
</ins><span class="cx"> 2017-02-19 Dean Jackson <dino@apple.com>
</span><span class="cx">
</span><span class="cx"> Activate/deactivate high performance GPU when requested
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformTextureMappercmake"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/TextureMapper.cmake (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/TextureMapper.cmake        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/TextureMapper.cmake        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -11,7 +11,6 @@
</span><span class="cx"> platform/graphics/texmap/TextureMapperFPSCounter.cpp
</span><span class="cx"> platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp
</span><span class="cx"> platform/graphics/texmap/TextureMapperLayer.cpp
</span><del>- platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp
</del><span class="cx"> platform/graphics/texmap/TextureMapperTile.cpp
</span><span class="cx"> platform/graphics/texmap/TextureMapperTiledBackingStore.cpp
</span><span class="cx"> )
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicsopenglGLPlatformSurfacecpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,119 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(GRAPHICS_CONTEXT_3D)
-#include "GLPlatformSurface.h"
-
-#if USE(GLX)
-#include "GLXSurface.h"
-#endif
-
-#if USE(EGL)
-#include "EGLSurface.h"
-#endif
-
-#include "NotImplemented.h"
-
-namespace WebCore {
-
-std::unique_ptr<GLPlatformSurface> GLPlatformSurface::createOffScreenSurface(SurfaceAttributes attributes)
-{
- std::unique_ptr<GLPlatformSurface> surface;
-#if USE(GLX)
- surface = std::make_unique<GLXOffScreenSurface>(attributes);
-#elif USE(EGL) && USE(GRAPHICS_SURFACE)
- surface = EGLOffScreenSurface::createOffScreenSurface(attributes);
-#else
- // FIXME: Need WGL implementation for Windows
- notImplemented();
-#endif
-
- if (surface && surface->drawable())
- return surface;
-
- return nullptr;
-}
-
-GLPlatformSurface::GLPlatformSurface(SurfaceAttributes)
- : m_drawable(0)
- , m_bufferHandle(0)
-{
-}
-
-GLPlatformSurface::~GLPlatformSurface()
-{
-}
-
-PlatformBufferHandle GLPlatformSurface::handle() const
-{
- return m_bufferHandle;
-}
-
-PlatformDrawable GLPlatformSurface::drawable() const
-{
- return m_drawable;
-}
-
-const IntRect& GLPlatformSurface::geometry() const
-{
- return m_rect;
-}
-
-PlatformSurfaceConfig GLPlatformSurface::configuration()
-{
- return 0;
-}
-
-void GLPlatformSurface::swapBuffers()
-{
- notImplemented();
-}
-
-void GLPlatformSurface::onMakeCurrent()
-{
-}
-
-void GLPlatformSurface::updateContents(const uint32_t)
-{
-}
-
-void GLPlatformSurface::setGeometry(const IntRect&)
-{
-}
-
-void GLPlatformSurface::destroy()
-{
-}
-
-GLPlatformSurface::SurfaceAttributes GLPlatformSurface::attributes() const
-{
- return GLPlatformSurface::Default;
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesGLTransportSurfacecpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,259 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "GLTransportSurface.h"
-
-#include "FloatRect.h"
-
-#if USE(GLX)
-#include "GLXSurface.h"
-#endif
-
-#if USE(EGL)
-#include "EGLSurface.h"
-#endif
-
-#include <texmap/TextureMapperShaderProgram.h>
-
-namespace WebCore {
-
-static const GLfloat vertices[] = { 0, 0, 1, 0, 1, 1, 0, 1 };
-static bool vertexArrayObjectSupported = false;
-
-std::unique_ptr<GLTransportSurface> GLTransportSurface::createTransportSurface(const IntSize& size, SurfaceAttributes attributes)
-{
- std::unique_ptr<GLTransportSurface> surface;
-#if USE(GLX)
- surface = std::make_unique<GLXTransportSurface>(size, attributes);
-#elif USE(EGL)
- surface = EGLTransportSurface::createTransportSurface(size, attributes);
-#endif
-
- if (surface && surface->handle() && surface->drawable())
- return surface;
-
- return nullptr;
-}
-
-GLTransportSurface::GLTransportSurface(const IntSize& size, SurfaceAttributes attributes)
- : GLPlatformSurface(attributes)
- , m_vbo(0)
- , m_vertexHandle(0)
- , m_boundTexture(0)
-{
- m_rect = IntRect(IntPoint(), size);
-}
-
-GLTransportSurface::~GLTransportSurface()
-{
-}
-
-void GLTransportSurface::updateContents(const uint32_t texture)
-{
- if (!m_shaderProgram)
- initializeShaderProgram();
-
- draw(texture);
- swapBuffers();
-}
-
-void GLTransportSurface::setGeometry(const IntRect& newRect)
-{
- m_rect = newRect;
-
- if (!m_shaderProgram)
- return;
-
- updateTransformationMatrix();
-}
-
-void GLTransportSurface::destroy()
-{
- m_rect = IntRect();
-
- if (!m_shaderProgram || !m_context3D)
- return;
-
- ::glBindFramebuffer(GL_FRAMEBUFFER, 0);
- ::glBindTexture(GL_TEXTURE_2D, 0);
- ::glBindBuffer(GL_ARRAY_BUFFER, 0);
-
- if (m_vbo)
- ::glDeleteBuffers(1, &m_vbo);
-
- if (m_vertexHandle) {
- m_context3D->getExtensions().bindVertexArrayOES(0);
- m_context3D->getExtensions().deleteVertexArrayOES(m_vertexHandle);
- } else if (m_shaderProgram)
- ::glDisableVertexAttribArray(m_shaderProgram->vertexLocation());
-
- ::glUseProgram(0);
-
- m_shaderProgram = nullptr;
- m_context3D = nullptr;
- m_boundTexture = 0;
-}
-
-void GLTransportSurface::draw(const uint32_t texture)
-{
- if (!m_vertexHandle)
- bindArrayBuffer();
-
- if (m_boundTexture != texture) {
- ::glBindTexture(GL_TEXTURE_2D, texture);
- m_boundTexture = texture;
- }
-
- ::glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-}
-
-void GLTransportSurface::bindArrayBuffer() const
-{
- ::glEnableVertexAttribArray(m_shaderProgram->vertexLocation());
- ::glBindBuffer(GL_ARRAY_BUFFER, m_vbo);
- ::glVertexAttribPointer(m_shaderProgram->vertexLocation(), 2, GraphicsContext3D::FLOAT, false, 0, 0);
-}
-
-void GLTransportSurface::updateTransformationMatrix()
-{
- if (!m_shaderProgram)
- return;
-
- ::glViewport(m_rect.x(), m_rect.y(), m_rect.width(), m_rect.height());
- m_boundTexture = 0;
-
- FloatRect targetRect = FloatRect(m_rect);
- TransformationMatrix identityMatrix;
- TransformationMatrix matrix = TransformationMatrix(identityMatrix).multiply(TransformationMatrix::rectToRect(FloatRect(0, 0, 1, 1), targetRect));
- m_shaderProgram->setMatrix(m_shaderProgram->modelViewMatrixLocation(), matrix);
-
- // Taken from TextureMapperGL.
- const float nearValue = 9999999;
- const float farValue = -99999;
-
- TransformationMatrix projectionMatrix = TransformationMatrix(2.0 / float(m_rect.width()), 0, 0, 0,
- 0, (-2.0) / float(m_rect.height()), 0, 0,
- 0, 0, -2.f / (farValue - nearValue), 0,
- -1, 1, -(farValue + nearValue) / (farValue - nearValue), 1);
-
- m_shaderProgram->setMatrix(m_shaderProgram->projectionMatrixLocation(), projectionMatrix);
-}
-
-void GLTransportSurface::initializeShaderProgram()
-{
- if (!m_context3D)
- m_context3D = GraphicsContext3D::createForCurrentGLContext();
-
- vertexArrayObjectSupported = m_context3D->getExtensions().supports("GL_OES_vertex_array_object");
-
- TextureMapperShaderProgram::Options options = TextureMapperShaderProgram::Texture;
- m_shaderProgram = TextureMapperShaderProgram::create(*m_context3D, options);
-
- ::glUseProgram(m_shaderProgram->programID());
- ::glUniform1i(m_shaderProgram->samplerLocation(), 0);
- ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- TransformationMatrix flipTransform;
- flipTransform.flipY();
- flipTransform.translate(0, -1);
- m_shaderProgram->setMatrix(m_shaderProgram->textureSpaceMatrixLocation(), flipTransform);
-
- ::glUniform1f(m_shaderProgram->opacityLocation(), 1.0);
-
- if (!m_vbo) {
- ::glGenBuffers(1, &m_vbo);
- ::glBindBuffer(GL_ARRAY_BUFFER, m_vbo);
- ::glBufferData(GL_ARRAY_BUFFER, sizeof(GC3Dfloat) * 8, vertices, GL_STATIC_DRAW);
- }
-
- // Create and set-up vertex array object.
- if (vertexArrayObjectSupported) {
- m_vertexHandle = m_context3D->getExtensions().createVertexArrayOES();
-
- if (m_vertexHandle) {
- m_context3D->getExtensions().bindVertexArrayOES(m_vertexHandle);
- bindArrayBuffer();
- }
- }
-
- updateTransformationMatrix();
-}
-
-std::unique_ptr<GLTransportSurfaceClient> GLTransportSurfaceClient::createTransportSurfaceClient(const PlatformBufferHandle handle, const IntSize& size, bool hasAlpha)
-{
- std::unique_ptr<GLTransportSurfaceClient> client;
-#if USE(GLX)
- client = std::make_unique<GLXTransportSurfaceClient>(handle, hasAlpha);
- UNUSED_PARAM(size);
-#else
- client = EGLTransportSurface::createTransportSurfaceClient(handle, size, hasAlpha);
-#endif
-
- if (!client || !client->texture()) {
- LOG_ERROR("Failed to Create Transport Surface client.");
- return nullptr;
- }
-
- return client;
-}
-
-
-GLTransportSurfaceClient::GLTransportSurfaceClient()
- : m_texture(0)
-{
-}
-
-GLTransportSurfaceClient::~GLTransportSurfaceClient()
-{
-}
-
-void GLTransportSurfaceClient::destroy()
-{
- if (m_texture) {
- glBindTexture(GL_TEXTURE_2D, 0);
- glDeleteTextures(1, &m_texture);
- m_texture = 0;
- }
-}
-
-void GLTransportSurfaceClient::prepareTexture()
-{
-}
-
-void GLTransportSurfaceClient::createTexture()
-{
- ::glGenTextures(1, &m_texture);
- ::glBindTexture(GL_TEXTURE_2D, m_texture);
- ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-}
-
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesGLTransportSurfaceh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,76 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef GLTransportSurface_h
-#define GLTransportSurface_h
-
-#include "GLPlatformSurface.h"
-
-namespace WebCore {
-
-class TextureMapperShaderProgram;
-
-class GLTransportSurface : public GLPlatformSurface {
-
-public:
- // Creates a GL surface whose results can be transported to the UI process for display.
- static std::unique_ptr<GLTransportSurface> createTransportSurface(const IntSize&, SurfaceAttributes = GLPlatformSurface::Default);
- virtual ~GLTransportSurface();
- void updateContents(const uint32_t) override;
- void setGeometry(const IntRect&) override;
- void destroy() override;
-
-protected:
- GLTransportSurface(const IntSize&, SurfaceAttributes);
- void updateTransformationMatrix();
- void bindArrayBuffer() const;
- void initializeShaderProgram();
- void draw(const uint32_t);
-
- RefPtr<GraphicsContext3D> m_context3D;
- RefPtr<TextureMapperShaderProgram> m_shaderProgram;
- Platform3DObject m_vbo;
- Platform3DObject m_vertexHandle;
- GLuint m_boundTexture;
-};
-
-class GLTransportSurfaceClient {
-
-public:
- static std::unique_ptr<GLTransportSurfaceClient> createTransportSurfaceClient(const PlatformBufferHandle, const IntSize&, bool);
- virtual ~GLTransportSurfaceClient();
- virtual void prepareTexture();
- virtual void destroy();
- GLuint texture() const { return m_texture; }
-
-protected:
- GLTransportSurfaceClient();
- void createTexture();
- GLuint m_texture;
-};
-
-}
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesGraphicsSurfacecpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurface.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurface.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurface.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,99 +0,0 @@
</span><del>-/*
- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "GraphicsSurface.h"
-
-#include "NotImplemented.h"
-
-#if USE(GRAPHICS_SURFACE)
-namespace WebCore {
-
-PassRefPtr<GraphicsSurface> GraphicsSurface::create(const IntSize& size, Flags flags, const GraphicsSurfaceToken& token)
-{
- return platformImport(size, flags, token);
-}
-
-PassRefPtr<GraphicsSurface> GraphicsSurface::create(const IntSize& size, GraphicsSurface::Flags flags, const PlatformGraphicsContext3D shareContext)
-{
- return platformCreate(size, flags, shareContext);
-}
-
-GraphicsSurfaceToken GraphicsSurface::exportToken()
-{
- return platformExport();
-}
-
-uint32_t GraphicsSurface::getTextureID()
-{
- return platformGetTextureID();
-}
-
-std::unique_ptr<GraphicsContext> GraphicsSurface::beginPaint(const IntRect& rect, LockOptions lockOptions)
-{
- int stride = 0;
- char* bits = platformLock(rect, &stride, lockOptions);
- auto graphicsContext = platformBeginPaint(rect.size(), bits, stride);
- return graphicsContext;
-}
-
-void GraphicsSurface::copyToGLTexture(uint32_t target, uint32_t texture, const IntRect& targetRect, const IntPoint& offset)
-{
- platformCopyToGLTexture(target, texture, targetRect, offset);
-}
-
-void GraphicsSurface::copyFromTexture(uint32_t texture, const IntRect& sourceRect)
-{
- platformCopyFromTexture(texture, sourceRect);
-}
-
-void GraphicsSurface::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity)
-{
- platformPaintToTextureMapper(textureMapper, targetRect, transform, opacity);
-}
-
-uint32_t GraphicsSurface::frontBuffer()
-{
- return platformFrontBuffer();
-}
-
-uint32_t GraphicsSurface::swapBuffers()
-{
- return platformSwapBuffers();
-}
-
-IntSize GraphicsSurface::size() const
-{
- return platformSize();
-}
-
-GraphicsSurface::GraphicsSurface(const IntSize&, Flags flags)
- : m_flags(flags)
- , m_fbo(0)
- , m_private(0)
-{
-}
-
-GraphicsSurface::~GraphicsSurface()
-{
- platformDestroy();
-}
-
-}
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesGraphicsSurfaceh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,122 +0,0 @@
</span><del>-/*
- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
- */
-
-#ifndef GraphicsSurface_h
-#define GraphicsSurface_h
-
-#if USE(GRAPHICS_SURFACE)
-
-#include "GraphicsContext.h"
-#include "GraphicsContext3D.h"
-#include "GraphicsSurfaceToken.h"
-#include "IntRect.h"
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
-
-#if OS(DARWIN)
-typedef struct __IOSurface* IOSurfaceRef;
-typedef IOSurfaceRef PlatformGraphicsSurface;
-#endif
-
-#if OS(LINUX)
-typedef uint32_t PlatformGraphicsSurface;
-#endif
-
-#if OS(WINDOWS)
-typedef HANDLE PlatformGraphicsSurface;
-#endif
-
-namespace WebCore {
-
-class BitmapTexture;
-class TextureMapper;
-struct GraphicsSurfacePrivate;
-
-class GraphicsSurface : public RefCounted<GraphicsSurface> {
-public:
- enum Flag {
- SupportsAlpha = 0x01,
- SupportsSoftwareWrite = 0x02,
- SupportsSoftwareRead = 0x04,
- SupportsTextureTarget = 0x08,
- SupportsTextureSource = 0x10,
- SupportsCopyToTexture = 0x20,
- SupportsCopyFromTexture = 0x40,
- SupportsSharing = 0x80,
- SupportsSingleBuffered = 0x100
- };
-
- enum LockOption {
- RetainPixels = 0x01,
- ReadOnly = 0x02
- };
-
- typedef int Flags;
- typedef int LockOptions;
-
- Flags flags() const { return m_flags; }
- IntSize size() const;
-
- static PassRefPtr<GraphicsSurface> create(const IntSize&, Flags, const PlatformGraphicsContext3D shareContext = 0);
- static PassRefPtr<GraphicsSurface> create(const IntSize&, Flags, const GraphicsSurfaceToken&);
- void copyToGLTexture(uint32_t target, uint32_t texture, const IntRect& targetRect, const IntPoint& sourceOffset);
- void copyFromTexture(uint32_t texture, const IntRect& sourceRect);
- void paintToTextureMapper(TextureMapper&, const FloatRect& targetRect, const TransformationMatrix&, float opacity);
- uint32_t frontBuffer();
- uint32_t swapBuffers();
- GraphicsSurfaceToken exportToken();
- uint32_t getTextureID();
- std::unique_ptr<GraphicsContext> beginPaint(const IntRect&, LockOptions);
- PassRefPtr<Image> createReadOnlyImage(const IntRect&);
- ~GraphicsSurface();
-
-protected:
- static PassRefPtr<GraphicsSurface> platformCreate(const IntSize&, Flags, const PlatformGraphicsContext3D);
- static PassRefPtr<GraphicsSurface> platformImport(const IntSize&, Flags, const GraphicsSurfaceToken&);
- GraphicsSurfaceToken platformExport();
- void platformDestroy();
-
- uint32_t platformGetTextureID();
- char* platformLock(const IntRect&, int* stride, LockOptions);
- void platformUnlock();
- void platformCopyToGLTexture(uint32_t target, uint32_t texture, const IntRect&, const IntPoint&);
- void platformCopyFromTexture(uint32_t texture, const IntRect& sourceRect);
- void platformPaintToTextureMapper(TextureMapper&, const FloatRect& targetRect, const TransformationMatrix&, float opacity);
- uint32_t platformFrontBuffer() const;
- uint32_t platformSwapBuffers();
- IntSize platformSize() const;
-
- std::unique_ptr<GraphicsContext> platformBeginPaint(const IntSize&, char* bits, int stride);
-
-protected:
- LockOptions m_lockOptions;
- Flags m_flags;
-
-private:
- GraphicsSurface(const IntSize&, Flags);
-
-private:
- uint32_t m_fbo;
- GraphicsSurfacePrivate* m_private;
-};
-
-}
-#endif // USE(GRAPHICS_SURFACE)
-
-#endif // GraphicsSurface_h
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesGraphicsSurfaceTokenh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,79 +0,0 @@
</span><del>-/*
- Copyright (C) 2012 Digia Corporation and/or its subsidiary(-ies)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
- */
-
-#ifndef GraphicsSurfaceToken_h
-#define GraphicsSurfaceToken_h
-
-#include "GraphicsContext.h"
-#include "IntRect.h"
-
-#if USE(GRAPHICS_SURFACE)
-
-namespace WebCore {
-
-struct GraphicsSurfaceToken {
-
-#if OS(DARWIN)
- typedef mach_port_t BufferHandle;
-#elif OS(LINUX)
- typedef uint32_t BufferHandle;
-#elif OS(WINDOWS)
- typedef HANDLE BufferHandle;
-#endif
-
-#if OS(DARWIN) || OS(WINDOWS)
- GraphicsSurfaceToken(BufferHandle frontBuffer = 0, BufferHandle backBuffer = 0)
- : frontBufferHandle(frontBuffer)
- , backBufferHandle(backBuffer)
- { }
-
- bool operator!=(const GraphicsSurfaceToken &rhs) const
- {
- return (frontBufferHandle != rhs.frontBufferHandle || backBufferHandle != rhs.backBufferHandle);
- }
-
- bool isValid() const
- {
- return frontBufferHandle && backBufferHandle;
- }
-
- BufferHandle backBufferHandle;
-#else
- GraphicsSurfaceToken(uint32_t windowID = 0)
- : frontBufferHandle(windowID)
- { }
-
- bool operator!=(const GraphicsSurfaceToken &rhs) const
- {
- return frontBufferHandle != rhs.frontBufferHandle;
- }
-
- bool isValid() const
- {
- return frontBufferHandle;
- }
-#endif
-
- BufferHandle frontBufferHandle;
-};
-
-}
-#endif // USE(GRAPHICS_SURFACE)
-
-#endif // GraphicsSurfaceToken_h
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLConfigSelectorcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLConfigSelector.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLConfigSelector.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLConfigSelector.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,230 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "EGLConfigSelector.h"
-
-#if USE(EGL)
-
-#include "EGLHelper.h"
-
-namespace WebCore {
-
-EGLConfigSelector::EGLConfigSelector(GLPlatformSurface::SurfaceAttributes attributes)
- : m_pixmapFBConfig(0)
- , m_surfaceContextFBConfig(0)
- , m_attributes(attributes)
-{
- m_sharedDisplay = EGLHelper::eglDisplay();
-}
-
-EGLConfigSelector::~EGLConfigSelector()
-{
-}
-
-EGLConfig EGLConfigSelector::pixmapContextConfig()
-{
- if (!m_pixmapFBConfig)
- m_pixmapFBConfig = createConfig(EGL_PIXMAP_BIT);
-
- return m_pixmapFBConfig;
-}
-
-EGLConfig EGLConfigSelector::surfaceContextConfig()
-{
- if (!m_surfaceContextFBConfig)
- m_surfaceContextFBConfig = createConfig(EGL_WINDOW_BIT);
-
- return m_surfaceContextFBConfig;
-}
-
-EGLint EGLConfigSelector::nativeVisualId(const EGLConfig& config) const
-{
- if (m_sharedDisplay == EGL_NO_DISPLAY)
- return -1;
-
- EGLint eglValue = 0;
- eglGetConfigAttrib(m_sharedDisplay, config, EGL_NATIVE_VISUAL_ID, &eglValue);
-
- return eglValue;
-}
-
-GLPlatformSurface::SurfaceAttributes EGLConfigSelector::attributes() const
-{
- return m_attributes;
-}
-
-void EGLConfigSelector::reset()
-{
- m_surfaceContextFBConfig = 0;
- m_pixmapFBConfig = 0;
-}
-
-EGLConfig EGLConfigSelector::createConfig(EGLint expectedSurfaceType)
-{
- if (m_sharedDisplay == EGL_NO_DISPLAY)
- return 0;
-
- EGLint numConfigs;
-
- eglGetConfigs(m_sharedDisplay, 0, 0, &numConfigs);
-
- if (!numConfigs) {
- LOG_ERROR("Failed to retrieve number of EGL configs.");
- return 0;
- }
-
- EGLConfig configs[numConfigs];
- eglGetConfigs(m_sharedDisplay, configs, numConfigs, &numConfigs);
-
- if (!numConfigs) {
- LOG_ERROR("Failed to retrieve any EGL configs.");
- return 0;
- }
-
- EGLConfig config = 0;
- EGLint alpha, surface, red, green, blue, renderType;
- EGLint expectedAlpha = m_attributes & GLPlatformSurface::SupportAlpha ? 8 : 0;
- EGLint expectedRed = 8;
- EGLint expectedBlue = 8;
- EGLint expectedGreen = 8;
-#if USE(OPENGL_ES_2)
- EGLint expectedRenderType = EGL_OPENGL_ES2_BIT;
-#else
- EGLint expectedRenderType = EGL_OPENGL_BIT;
-#endif
-
- for (int i = 0; i < numConfigs; i++) {
- EGLConfig tempConfig = configs[i];
- eglGetConfigAttrib(m_sharedDisplay, tempConfig, EGL_RENDERABLE_TYPE, &renderType);
-
- if (!(renderType & expectedRenderType))
- continue;
-
- eglGetConfigAttrib(m_sharedDisplay, tempConfig, EGL_ALPHA_SIZE, &alpha);
-
- if (alpha != expectedAlpha)
- continue;
-
- eglGetConfigAttrib(m_sharedDisplay, tempConfig, EGL_RED_SIZE, &red);
-
- if (red != expectedRed)
- continue;
-
- eglGetConfigAttrib(m_sharedDisplay, tempConfig, EGL_GREEN_SIZE, &green);
-
- if (green != expectedGreen)
- continue;
-
- eglGetConfigAttrib(m_sharedDisplay, tempConfig, EGL_BLUE_SIZE, &blue);
-
- if (blue != expectedBlue)
- continue;
-
- eglGetConfigAttrib(m_sharedDisplay, tempConfig, EGL_SURFACE_TYPE, &surface);
-
- if (surface & expectedSurfaceType) {
- config = configs[i];
- break;
- }
- }
-
- if ((m_attributes & GLPlatformSurface::SupportAlpha) && !config) {
- LOG_ERROR("Failed to retrieve EGL Configuration with alpha. Trying to find one without alpha support.");
- m_attributes &= ~GLPlatformSurface::SupportAlpha;
- config = createConfig(expectedSurfaceType);
- }
-
- if (!config)
- LOG_ERROR("Failed to find a valid EGL Configuration.");
-
- return config;
-}
-
-#if PLATFORM(X11)
-EGLConfig EGLConfigSelector::surfaceClientConfig(NativeVisualId id)
-{
- EGLConfig config = findMatchingConfigWithVisualId(id);
-
- if (!config)
- config = createConfig(EGL_PIXMAP_BIT);
-
- return config;
-}
-
-EGLConfig EGLConfigSelector::findMatchingConfigWithVisualId(NativeVisualId id)
-{
- if (m_sharedDisplay == EGL_NO_DISPLAY)
- return 0;
-
- EGLint numConfigs;
- EGLint i;
- EGLint visualId;
- EGLConfig config = 0;
-
- eglGetConfigs(m_sharedDisplay, 0, 0, &numConfigs);
-
- if (!numConfigs) {
- LOG_ERROR("Failed to retrieve any EGL configs.");
- return 0;
- }
-
- EGLConfig configs[numConfigs];
- eglGetConfigs(m_sharedDisplay, configs, numConfigs, &numConfigs);
-
- if (!numConfigs) {
- LOG_ERROR("Failed to retrieve any EGL configs.");
- return 0;
- }
-
- int alphaChannelRequired = m_attributes & GLPlatformSurface::SupportAlpha ? 8 : 0;
- for (i = 0; i < numConfigs; i++) {
- EGLint alpha, surfaces;
- EGLConfig tempConfig = configs[i];
- eglGetConfigAttrib(m_sharedDisplay, tempConfig, EGL_NATIVE_VISUAL_ID, &visualId);
-
- if (static_cast<NativeVisualId>(visualId) != id)
- continue;
-
- eglGetConfigAttrib(m_sharedDisplay, tempConfig, EGL_ALPHA_SIZE, &alpha);
-
- if (alphaChannelRequired != alpha)
- continue;
-
- eglGetConfigAttrib(m_sharedDisplay, tempConfig, EGL_SURFACE_TYPE, &surfaces);
-
- if (surfaces & EGL_PIXMAP_BIT) {
- config = tempConfig;
- break;
- }
- }
-
- return config;
-}
-#endif
-
-}
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLConfigSelectorh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLConfigSelector.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLConfigSelector.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLConfigSelector.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,71 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef EGLConfigSelector_h
-#define EGLConfigSelector_h
-
-#if USE(EGL)
-
-#include <opengl/GLDefs.h>
-#include <opengl/GLPlatformSurface.h>
-#include <wtf/Noncopyable.h>
-
-namespace WebCore {
-#if PLATFORM(X11)
-typedef VisualID NativeVisualId;
-#endif
-
-class EGLConfigSelector {
- WTF_MAKE_NONCOPYABLE(EGLConfigSelector);
-public:
- EGLConfigSelector(GLPlatformSurface::SurfaceAttributes);
- virtual ~EGLConfigSelector();
- virtual EGLConfig pixmapContextConfig();
- virtual EGLConfig surfaceContextConfig();
- EGLint nativeVisualId(const EGLConfig&) const;
- GLPlatformSurface::SurfaceAttributes attributes() const;
- void reset();
-#if PLATFORM(X11)
- virtual EGLConfig surfaceClientConfig(NativeVisualId);
-#endif
-
-private:
-#if PLATFORM(X11)
- EGLConfig findMatchingConfigWithVisualId(NativeVisualId);
-#endif
- EGLConfig createConfig(EGLint expectedSurfaceType);
-
-protected:
- EGLConfig m_pixmapFBConfig;
- EGLConfig m_surfaceContextFBConfig;
- unsigned m_attributes : 3;
- EGLDisplay m_sharedDisplay;
-};
-
-}
-
-#endif
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLContextcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLContext.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLContext.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLContext.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,158 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "EGLContext.h"
-
-#if USE(EGL)
-
-#include "PlatformDisplay.h"
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-static const EGLint contextAttributes[] = {
-#if USE(OPENGL_ES_2)
- EGL_CONTEXT_CLIENT_VERSION, 2,
-#endif
- EGL_NONE
-};
-
-static const EGLint contextRobustnessAttributes[] = {
-#if USE(OPENGL_ES_2)
- EGL_CONTEXT_CLIENT_VERSION, 2,
-#endif
- EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT,
- EGL_LOSE_CONTEXT_ON_RESET_EXT,
- EGL_NONE
-};
-
-static bool isRobustnessExtSupported(EGLDisplay display)
-{
- static bool didQueryForRobustnessExtension = false;
- static bool isRobustnessExtensionSupported = false;
-
- if (!didQueryForRobustnessExtension) {
- didQueryForRobustnessExtension = true;
- isRobustnessExtensionSupported = GLPlatformContext::supportsEGLExtension(display, "EGL_EXT_create_context_robustness");
- }
-
- return isRobustnessExtensionSupported;
-}
-
-EGLOffScreenContext::EGLOffScreenContext()
- : GLPlatformContext()
- , m_display(0)
-{
-}
-
-bool EGLOffScreenContext::initialize(GLPlatformSurface* surface, PlatformContext sharedContext)
-{
- if (!surface)
- return false;
-
- m_display = PlatformDisplay::sharedDisplay().eglDisplay();
- if (!m_display)
- return false;
-
- EGLConfig config = surface->configuration();
- if (!config)
- return false;
-
- if (isRobustnessExtSupported(m_display))
- m_contextHandle = eglCreateContext(m_display, config, sharedContext, contextRobustnessAttributes);
-
- if (m_contextHandle != EGL_NO_CONTEXT) {
- // The EGL_EXT_create_context_robustness spec requires that a context created with
- // EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT bit set must also support GL_EXT_robustness or
- // a version of OpenGL incorporating equivalent functionality.
- // The spec also defines similar requirements for attribute EGL_LOSE_CONTEXT_ON_RESET_EXT.
- if (platformMakeCurrent(surface) && (GLPlatformContext::supportsGLExtension("GL_EXT_robustness")))
- m_resetLostContext = true;
- else
- eglDestroyContext(m_display, m_contextHandle);
- }
-
- if (m_contextHandle == EGL_NO_CONTEXT) {
- m_contextHandle = eglCreateContext(m_display, config, sharedContext, contextAttributes);
- if (!platformMakeCurrent(surface))
- eglDestroyContext(m_display, m_contextHandle);
- }
-
- if (m_contextHandle != EGL_NO_CONTEXT)
- return true;
-
- return false;
-}
-
-EGLOffScreenContext::~EGLOffScreenContext()
-{
-}
-
-bool EGLOffScreenContext::isCurrentContext() const
-{
- return m_contextHandle == eglGetCurrentContext();
-}
-
-bool EGLOffScreenContext::platformMakeCurrent(GLPlatformSurface* surface)
-{
- if (!eglMakeCurrent(m_display, surface->drawable(), surface->drawable(), m_contextHandle)) {
- LOG_ERROR("Failed to make context current(%d).", eglGetError());
-
- if (m_resetLostContext && eglGetError() == EGL_CONTEXT_LOST) {
- LOG_ERROR("Lost current context.");
- m_contextLost = true;
- }
-
- return false;
- }
-
- return true;
-}
-
-void EGLOffScreenContext::platformReleaseCurrent()
-{
- eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
-}
-
-void EGLOffScreenContext::freeResources()
-{
- if (m_contextHandle == EGL_NO_CONTEXT)
- return;
-
- eglDestroyContext(m_display, m_contextHandle);
- m_contextHandle = EGL_NO_CONTEXT;
- m_display = 0;
-}
-
-void EGLOffScreenContext::destroy()
-{
- GLPlatformContext::destroy();
- freeResources();
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLContexth"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLContext.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLContext.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLContext.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,55 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef EGLContext_h
-#define EGLContext_h
-
-#if USE(EGL)
-
-#include "GLPlatformContext.h"
-
-namespace WebCore {
-
-class EGLOffScreenContext : public GLPlatformContext {
-
-public:
- EGLOffScreenContext();
- virtual ~EGLOffScreenContext();
- bool initialize(GLPlatformSurface*, PlatformContext) override;
- bool platformMakeCurrent(GLPlatformSurface*) override;
- void platformReleaseCurrent() override;
- void destroy() override;
- bool isCurrentContext() const override;
-
-private:
- void freeResources();
- EGLDisplay m_display;
-};
-
-}
-
-#endif
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLHelpercpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,109 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "EGLHelper.h"
-
-#if USE(EGL)
-
-#include "PlatformDisplay.h"
-#include <opengl/GLPlatformContext.h>
-
-
-namespace WebCore {
-
-static PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR = 0;
-static PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR = 0;
-static PFNGLEGLIMAGETARGETTEXTURE2DOESPROC eglImageTargetTexture2DOES = 0;
-
-EGLDisplay EGLHelper::eglDisplay()
-{
- PlatformDisplay::sharedDisplay().eglDisplay();
-}
-
-EGLDisplay EGLHelper::currentDisplay()
-{
- EGLDisplay display = eglGetCurrentDisplay();
-
- if (display == EGL_NO_DISPLAY)
- display = EGLHelper::eglDisplay();
-
- return display;
-}
-
-void EGLHelper::resolveEGLBindings()
-{
- static bool initialized = false;
-
- if (initialized)
- return;
-
- initialized = true;
-
- EGLDisplay display = currentDisplay();
-
- if (display == EGL_NO_DISPLAY)
- return;
-
- if (GLPlatformContext::supportsEGLExtension(display, "EGL_KHR_image") && GLPlatformContext::supportsEGLExtension(display, "EGL_KHR_image_pixmap") && GLPlatformContext::supportsGLExtension("GL_OES_EGL_image")) {
- eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC) eglGetProcAddress("eglCreateImageKHR");
- eglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC) eglGetProcAddress("eglDestroyImageKHR");
- eglImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)eglGetProcAddress("glEGLImageTargetTexture2DOES");
- }
-}
-
-void EGLHelper::createEGLImage(EGLImageKHR* image, GLenum target, const EGLClientBuffer clientBuffer, const EGLint attributes[])
-{
- EGLDisplay display = currentDisplay();
-
- if (display == EGL_NO_DISPLAY)
- return;
-
- EGLImageKHR tempHandle = EGL_NO_IMAGE_KHR;
-
- if (eglCreateImageKHR && eglImageTargetTexture2DOES && eglDestroyImageKHR)
- tempHandle = eglCreateImageKHR(display, EGL_NO_CONTEXT, target, clientBuffer, attributes);
-
- *image = tempHandle;
-}
-
-void EGLHelper::destroyEGLImage(const EGLImageKHR image)
-{
- EGLDisplay display = currentDisplay();
-
- if (display == EGL_NO_DISPLAY)
- return;
-
- if (eglDestroyImageKHR)
- eglDestroyImageKHR(display, image);
-}
-
-void EGLHelper::imageTargetTexture2DOES(const EGLImageKHR image)
-{
- eglImageTargetTexture2DOES(GL_TEXTURE_2D, static_cast<GLeglImageOES>(image));
-}
-
-}
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLHelperh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLHelper.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef EGLHelper_h
-#define EGLHelper_h
-
-#if USE(EGL)
-
-#include <opengl/GLDefs.h>
-
-namespace WebCore {
-
-class EGLHelper {
-public:
- static EGLDisplay eglDisplay();
- static EGLDisplay currentDisplay();
- static void resolveEGLBindings();
- static void createEGLImage(EGLImageKHR*, GLenum, const EGLClientBuffer, const EGLint* = 0);
- static void destroyEGLImage(const EGLImageKHR);
- static void imageTargetTexture2DOES(const EGLImageKHR);
-};
-
-}
-
-#endif
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLSurfacecpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,171 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "EGLSurface.h"
-
-#if USE(EGL) && USE(GRAPHICS_SURFACE)
-
-#include "EGLConfigSelector.h"
-#include "EGLHelper.h"
-#include "GLPlatformContext.h"
-
-#if PLATFORM(X11)
-#include "EGLXSurface.h"
-#endif
-
-namespace WebCore {
-
-std::unique_ptr<GLTransportSurface> EGLTransportSurface::createTransportSurface(const IntSize& size, SurfaceAttributes attributes)
-{
- std::unique_ptr<GLTransportSurface> surface;
-#if PLATFORM(X11)
- surface = std::make_unique<EGLWindowTransportSurface>(size, attributes);
-#else
- UNUSED_PARAM(size);
- UNUSED_PARAM(attributes);
-#endif
-
- if (surface)
- return WTFMove(surface);
-
- return nullptr;
-}
-
-std::unique_ptr<GLTransportSurfaceClient> EGLTransportSurface::createTransportSurfaceClient(const PlatformBufferHandle handle, const IntSize& size, bool hasAlpha)
-{
- EGLHelper::resolveEGLBindings();
- std::unique_ptr<GLTransportSurfaceClient> client;
-#if PLATFORM(X11)
- client = std::make_unique<EGLXTransportSurfaceClient>(handle, size, hasAlpha);
-#else
- UNUSED_PARAM(handle);
- UNUSED_PARAM(size);
- UNUSED_PARAM(hasAlpha);
-#endif
-
- if (client)
- return WTFMove(client);
-
- return nullptr;
-}
-
-EGLTransportSurface::EGLTransportSurface(const IntSize& size, SurfaceAttributes attributes)
- : GLTransportSurface(size, attributes)
-{
- if (EGLHelper::eglDisplay() == EGL_NO_DISPLAY)
- return;
-
- m_configSelector = std::make_unique<EGLConfigSelector>(attributes);
-}
-
-GLPlatformSurface::SurfaceAttributes EGLTransportSurface::attributes() const
-{
- return m_configSelector->attributes();
-}
-
-bool EGLTransportSurface::isCurrentDrawable() const
-{
- return m_drawable == eglGetCurrentSurface(EGL_DRAW);
-}
-
-EGLTransportSurface::~EGLTransportSurface()
-{
-}
-
-void EGLTransportSurface::destroy()
-{
- if (m_drawable == EGL_NO_SURFACE || EGLHelper::eglDisplay() == EGL_NO_DISPLAY)
- return;
-
- GLTransportSurface::destroy();
-
- if (m_drawable) {
- eglDestroySurface(EGLHelper::eglDisplay(), m_drawable);
- m_drawable = EGL_NO_SURFACE;
- }
-
- m_configSelector = nullptr;
-}
-
-PlatformSurfaceConfig EGLTransportSurface::configuration()
-{
- return m_configSelector->surfaceContextConfig();
-}
-
-std::unique_ptr<GLPlatformSurface> EGLOffScreenSurface::createOffScreenSurface(SurfaceAttributes attributes)
-{
-#if PLATFORM(X11)
- return std::make_unique<EGLPixmapSurface>(attributes);
-#else
- UNUSED_PARAM(attributes);
- return nullptr;
-#endif
-}
-
-EGLOffScreenSurface::EGLOffScreenSurface(SurfaceAttributes surfaceAttributes)
- : GLPlatformSurface(surfaceAttributes)
-{
- if (EGLHelper::eglDisplay() == EGL_NO_DISPLAY)
- return;
-
- m_configSelector = std::make_unique<EGLConfigSelector>(surfaceAttributes);
-}
-
-EGLOffScreenSurface::~EGLOffScreenSurface()
-{
-}
-
-GLPlatformSurface::SurfaceAttributes EGLOffScreenSurface::attributes() const
-{
- return m_configSelector->attributes();
-}
-
-bool EGLOffScreenSurface::isCurrentDrawable() const
-{
- return m_drawable == eglGetCurrentSurface(EGL_DRAW);
-}
-
-PlatformSurfaceConfig EGLOffScreenSurface::configuration()
-{
- return m_configSelector->pixmapContextConfig();
-}
-
-void EGLOffScreenSurface::destroy()
-{
- if (EGLHelper::eglDisplay() == EGL_NO_DISPLAY || m_drawable == EGL_NO_SURFACE)
- return;
-
- if (m_drawable) {
- eglDestroySurface(EGLHelper::eglDisplay(), m_drawable);
- m_drawable = EGL_NO_SURFACE;
- }
-
- m_configSelector = nullptr;
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLSurfaceh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,72 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef EGLSurface_h
-#define EGLSurface_h
-
-#if USE(EGL) && USE(GRAPHICS_SURFACE)
-
-#include "GLTransportSurface.h"
-
-#include <wtf/Noncopyable.h>
-
-namespace WebCore {
-
-class EGLConfigSelector;
-
-class EGLTransportSurface : public GLTransportSurface {
-public:
- static std::unique_ptr<GLTransportSurface> createTransportSurface(const IntSize&, SurfaceAttributes);
- static std::unique_ptr<GLTransportSurfaceClient> createTransportSurfaceClient(const PlatformBufferHandle, const IntSize&, bool);
- virtual ~EGLTransportSurface();
- PlatformSurfaceConfig configuration() override;
- void destroy() override;
- GLPlatformSurface::SurfaceAttributes attributes() const override;
- bool isCurrentDrawable() const override;
-
-protected:
- EGLTransportSurface(const IntSize&, SurfaceAttributes);
- std::unique_ptr<EGLConfigSelector> m_configSelector;
-};
-
-class EGLOffScreenSurface : public GLPlatformSurface {
-public:
- static std::unique_ptr<GLPlatformSurface> createOffScreenSurface(SurfaceAttributes);
- virtual ~EGLOffScreenSurface();
- PlatformSurfaceConfig configuration() override;
- void destroy() override;
- GLPlatformSurface::SurfaceAttributes attributes() const override;
- bool isCurrentDrawable() const override;
-
-protected:
- EGLOffScreenSurface(SurfaceAttributes);
- std::unique_ptr<EGLConfigSelector> m_configSelector;
-};
-
-}
-
-#endif
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLXSurfacecpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLXSurface.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLXSurface.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLXSurface.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,326 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "EGLXSurface.h"
-
-#if PLATFORM(X11) && USE(EGL) && USE(GRAPHICS_SURFACE)
-
-#include "EGLConfigSelector.h"
-#include "EGLHelper.h"
-#include "GLPlatformContext.h"
-#include "PlatformDisplay.h"
-
-namespace WebCore {
-
-EGLWindowTransportSurface::EGLWindowTransportSurface(const IntSize& size, GLPlatformSurface::SurfaceAttributes attributes)
- : EGLTransportSurface(size, attributes)
-{
- if (!m_configSelector)
- return;
-
- if (!m_configSelector->surfaceContextConfig()) {
- destroy();
- return;
- }
-
- EGLint visualId = m_configSelector->nativeVisualId(m_configSelector->surfaceContextConfig());
-
- if (visualId == -1) {
- destroy();
- return;
- }
-
- NativeWrapper::createOffScreenWindow(&m_bufferHandle, visualId, m_configSelector->attributes() & GLPlatformSurface::SupportAlpha, size);
-
- if (!m_bufferHandle) {
- destroy();
- return;
- }
-
- m_drawable = eglCreateWindowSurface(PlatformDisplay::sharedDisplay().eglDisplay(), m_configSelector->surfaceContextConfig(), static_cast<EGLNativeWindowType>(m_bufferHandle), 0);
-
- if (m_drawable == EGL_NO_SURFACE) {
- LOG_ERROR("Failed to create EGL surface(%d).", eglGetError());
- destroy();
- }
-}
-
-EGLWindowTransportSurface::~EGLWindowTransportSurface()
-{
-}
-
-void EGLWindowTransportSurface::swapBuffers()
-{
- if (!eglSwapBuffers(PlatformDisplay::sharedDisplay().eglDisplay(), m_drawable))
- LOG_ERROR("Failed to SwapBuffers(%d).", eglGetError());
-}
-
-void EGLWindowTransportSurface::destroy()
-{
- EGLTransportSurface::destroy();
-
- if (m_bufferHandle) {
- NativeWrapper::destroyWindow(m_bufferHandle);
- m_bufferHandle = 0;
- }
-}
-
-EGLPixmapSurface::EGLPixmapSurface(GLPlatformSurface::SurfaceAttributes surfaceAttributes)
- : EGLOffScreenSurface(surfaceAttributes)
-{
- if (!m_configSelector)
- return;
-
- EGLConfig config = m_configSelector->pixmapContextConfig();
-
- if (!config) {
- destroy();
- return;
- }
-
- EGLint visualId = m_configSelector->nativeVisualId(config);
-
- if (visualId == -1) {
- destroy();
- return;
- }
-
- NativePixmap pixmap;
- NativeWrapper::createPixmap(&pixmap, visualId, m_configSelector->attributes() & GLPlatformSurface::SupportAlpha);
- m_bufferHandle = pixmap;
-
- if (!m_bufferHandle) {
- destroy();
- return;
- }
-
- m_drawable = eglCreatePixmapSurface(PlatformDisplay::sharedDisplay().eglDisplay(), config, static_cast<EGLNativePixmapType>(m_bufferHandle), 0);
-
- if (m_drawable == EGL_NO_SURFACE) {
- LOG_ERROR("Failed to create EGL surface(%d).", eglGetError());
- destroy();
- }
-}
-
-EGLPixmapSurface::~EGLPixmapSurface()
-{
-}
-
-void EGLPixmapSurface::destroy()
-{
- EGLOffScreenSurface::destroy();
-
- if (m_bufferHandle) {
- NativeWrapper::destroyPixmap(m_bufferHandle);
- m_bufferHandle = 0;
- }
-}
-
-EGLXTransportSurfaceClient::EGLXTransportSurfaceClient(const PlatformBufferHandle handle, const IntSize& size, bool hasAlpha)
- : GLTransportSurfaceClient()
- , m_size(size)
- , m_totalBytes(0)
-{
- if (!handle)
- return;
-
- m_handle = handle;
- XWindowAttributes attr;
-
- if (!XGetWindowAttributes(NativeWrapper::nativeDisplay(), m_handle, &attr))
- return;
-
- createTexture();
- GLPlatformSurface::SurfaceAttributes sharedSurfaceAttributes = GLPlatformSurface::Default;
-
- if (hasAlpha)
- sharedSurfaceAttributes = GLPlatformSurface::SupportAlpha;
-
- EGLConfigSelector configSelector(sharedSurfaceAttributes);
- EGLConfig config = configSelector.surfaceClientConfig(XVisualIDFromVisual(attr.visual));
- m_eglImage = std::make_unique<EGLTextureFromPixmap>(m_handle, hasAlpha, config);
-
- if (!m_eglImage->isValid() || eglGetError() != EGL_SUCCESS)
- destroy();
-
- if (m_eglImage)
- return;
-
- m_totalBytes = m_size.width() * m_size.height() * 4;
-
-#if USE(OPENGL_ES_2)
- m_format = GraphicsContext3D::RGBA;
- static bool bgraSupported = GLPlatformContext::supportsGLExtension("GL_EXT_texture_format_BGRA8888");
- if (bgraSupported)
- m_format = GraphicsContext3D::BGRA;
-#endif
-
- createTexture();
- prepareTexture();
-}
-
-EGLXTransportSurfaceClient::~EGLXTransportSurfaceClient()
-{
-}
-
-void EGLXTransportSurfaceClient::destroy()
-{
- GLTransportSurfaceClient::destroy();
-
- if (m_eglImage) {
- m_eglImage->destroy();
- m_eglImage = nullptr;
- }
-
- eglWaitGL();
- m_image = nullptr;
-}
-
-void EGLXTransportSurfaceClient::prepareTexture()
-{
- ::glBindTexture(GL_TEXTURE_2D, m_texture);
-
- if (m_eglImage) {
- m_eglImage->reBindTexImage();
- return;
- }
-
- // Fallback to use XImage in case EGLImage and TextureToPixmap are not supported.
- m_image.reset(XGetImage(NativeWrapper::nativeDisplay(), m_handle, 0, 0, m_size.width(), m_size.height(), AllPlanes, ZPixmap));
-
-#if USE(OPENGL_ES_2)
- if (m_format != GraphicsContext3D::BGRA) {
- for (unsigned i = 0; i < m_totalBytes; i += 4)
- std::swap(m_image->data[i], m_image->data[i + 2]);
- }
-#endif
-
- glTexImage2D(GL_TEXTURE_2D, 0, m_format, m_size.width(), m_size.height(), 0, m_format, GL_UNSIGNED_BYTE, m_image->data);
-
- m_image = nullptr;
-}
-
-EGLTextureFromPixmap::EGLTextureFromPixmap(const NativePixmap handle, bool hasAlpha, EGLConfig config)
- : m_eglImage(0)
- , m_surface(EGL_NO_SURFACE)
-{
- if (!handle)
- return;
-
- static bool textureFromPixmapSupported = GLPlatformContext::supportsEGLExtension(EGLHelper::eglDisplay(), "EGL_NOK_texture_from_pixmap");
-
- if (textureFromPixmapSupported) {
- const EGLint pixmapAttribs[] = { EGL_TEXTURE_FORMAT, hasAlpha ? EGL_TEXTURE_RGBA : EGL_TEXTURE_RGB, EGL_TEXTURE_TARGET, EGL_TEXTURE_2D, EGL_NONE };
- m_surface = eglCreatePixmapSurface(EGLHelper::eglDisplay(), config, handle, pixmapAttribs);
-
- if (m_surface != EGL_NO_SURFACE && !eglBindTexImage(EGLHelper::eglDisplay(), m_surface, EGL_BACK_BUFFER))
- destroy();
- }
-
- if (m_surface != EGL_NO_SURFACE)
- return;
-
- static const EGLint imageAttrs[] = { EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE };
- EGLHelper::createEGLImage(&m_eglImage, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)(handle), imageAttrs);
-
- if (m_eglImage) {
- EGLHelper::imageTargetTexture2DOES(m_eglImage);
- EGLint error = eglGetError();
-
- if (error != EGL_SUCCESS)
- destroy();
- }
-}
-
-EGLTextureFromPixmap::~EGLTextureFromPixmap()
-{
-}
-
-void EGLTextureFromPixmap::destroy()
-{
- eglWaitNative(EGL_CORE_NATIVE_ENGINE);
-
- if (m_surface != EGL_NO_SURFACE)
- eglReleaseTexImage(EGLHelper::eglDisplay(), m_surface, EGL_BACK_BUFFER);
-
- if (m_eglImage) {
- EGLHelper::destroyEGLImage(m_eglImage);
- m_eglImage = 0;
- }
-
- if (m_surface != EGL_NO_SURFACE) {
- eglDestroySurface(EGLHelper::eglDisplay(), m_surface);
- m_surface = EGL_NO_SURFACE;
- }
-
- eglWaitGL();
-}
-
-bool EGLTextureFromPixmap::isValid() const
-{
- if (m_surface || m_eglImage)
- return true;
-
- return false;
-}
-
-bool EGLTextureFromPixmap::bindTexImage()
-{
- if (m_surface != EGL_NO_SURFACE) {
- bool success = eglBindTexImage(EGLHelper::eglDisplay(), m_surface, EGL_BACK_BUFFER);
- return success;
- }
-
- if (m_eglImage) {
- EGLHelper::imageTargetTexture2DOES(m_eglImage);
- return true;
- }
-
- return false;
-}
-
-bool EGLTextureFromPixmap::reBindTexImage()
-{
- if (m_surface != EGL_NO_SURFACE) {
- bool success = eglReleaseTexImage(EGLHelper::eglDisplay(), m_surface, EGL_BACK_BUFFER);
-
- if (success)
- success = eglBindTexImage(EGLHelper::eglDisplay(), m_surface, EGL_BACK_BUFFER);
-
- return success;
- }
-
- if (m_eglImage) {
- EGLHelper::imageTargetTexture2DOES(m_eglImage);
- return true;
- }
-
- return false;
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfaceseglEGLXSurfaceh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLXSurface.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLXSurface.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/egl/EGLXSurface.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,89 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef EGLXSurface_h
-#define EGLXSurface_h
-
-#if PLATFORM(X11) && USE(EGL) && USE(GRAPHICS_SURFACE)
-
-#include "EGLSurface.h"
-#include "XUniquePtr.h"
-#include <glx/X11Helper.h>
-
-namespace WebCore {
-
-typedef Pixmap NativePixmap;
-
-// Contents of the surface are backed by native window.
-class EGLWindowTransportSurface : public EGLTransportSurface {
-public:
- EGLWindowTransportSurface(const IntSize&, GLPlatformSurface::SurfaceAttributes);
- virtual ~EGLWindowTransportSurface();
- void swapBuffers() override;
- void destroy() override;
-};
-
-class EGLPixmapSurface : public EGLOffScreenSurface {
-public:
- EGLPixmapSurface(GLPlatformSurface::SurfaceAttributes);
- virtual ~EGLPixmapSurface();
- void destroy() override;
-};
-
-class EGLTextureFromPixmap {
-public:
- EGLTextureFromPixmap(const NativePixmap, bool, EGLConfig);
- virtual ~EGLTextureFromPixmap();
- bool bindTexImage();
- bool isValid() const;
- bool reBindTexImage();
- void destroy();
-
-private:
- EGLImageKHR m_eglImage;
- EGLSurface m_surface;
-};
-
-class EGLXTransportSurfaceClient : public GLTransportSurfaceClient {
-public:
- EGLXTransportSurfaceClient(const PlatformBufferHandle, const IntSize&, bool);
- virtual ~EGLXTransportSurfaceClient();
- void prepareTexture() override;
- void destroy() override;
-
-private:
- XUniquePtr<XImage> m_image;
- IntSize m_size;
- PlatformBufferHandle m_handle;
- GLuint m_format;
- unsigned m_totalBytes;
- std::unique_ptr<EGLTextureFromPixmap> m_eglImage;
-};
-
-}
-
-#endif
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxGLXConfigSelectorh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXConfigSelector.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXConfigSelector.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXConfigSelector.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,210 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef GLXConfigSelector_h
-#define GLXConfigSelector_h
-
-#if USE(GLX)
-
-#include "X11Helper.h"
-#include "XUniquePtr.h"
-#include <opengl/GLDefs.h>
-#include <opengl/GLPlatformSurface.h>
-
-namespace WebCore {
-
-static int clientAttributes[] = {
- // The specification is a set key value pairs stored in a simple array.
- GLX_LEVEL, 0,
- static_cast<int>(GLX_VISUAL_ID), 0,
- GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT,
- GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT,
- GLX_BIND_TO_TEXTURE_RGBA_EXT, TRUE,
- 0
-};
-
-static int glxSurfaceAttributes[] = {
- GLX_LEVEL, 0,
- GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT,
- GLX_RENDER_TYPE, 0,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
- GLX_ALPHA_SIZE, 0,
- GLX_DOUBLEBUFFER, GL_FALSE,
- None
-};
-
-class GLXConfigSelector {
- WTF_MAKE_NONCOPYABLE(GLXConfigSelector);
-
-public:
- GLXConfigSelector(GLPlatformSurface::SurfaceAttributes attr = GLPlatformSurface::Default)
- : m_surfaceContextFBConfig(0)
- , m_pixmapContextFBConfig(0)
- , m_attributes(attr)
- {
- }
-
- virtual ~GLXConfigSelector()
- {
- }
-
- XVisualInfo* visualInfo(const GLXFBConfig& config)
- {
- return glXGetVisualFromFBConfig(X11Helper::nativeDisplay(), config);
- }
-
- GLXFBConfig pixmapContextConfig()
- {
- if (!m_pixmapContextFBConfig) {
- validateAttributes();
- m_pixmapContextFBConfig = findMatchingConfig(glxSurfaceAttributes, m_attributes & GLPlatformSurface::SupportAlpha ? 32 : 24);
- }
-
- return m_pixmapContextFBConfig;
- }
-
-
- GLXFBConfig surfaceContextConfig()
- {
- if (!m_surfaceContextFBConfig) {
- glxSurfaceAttributes[3] = GLX_WINDOW_BIT;
- glxSurfaceAttributes[7] = 8;
- glxSurfaceAttributes[9] = 8;
- glxSurfaceAttributes[11] = 8;
- validateAttributes();
- m_surfaceContextFBConfig = findMatchingConfig(glxSurfaceAttributes, m_attributes & GLPlatformSurface::SupportAlpha ? 32 : 24);
- }
-
- return m_surfaceContextFBConfig;
- }
-
- GLXFBConfig surfaceClientConfig(int depth, VisualID id)
- {
- clientAttributes[3] = static_cast<int>(id);
- clientAttributes[8] = depth == 32 ? GLX_BIND_TO_TEXTURE_RGBA_EXT : GLX_BIND_TO_TEXTURE_RGB_EXT;
- // Prefer to match with Visual Id.
- GLXFBConfig config = findMatchingConfigWithVisualId(clientAttributes, depth, id);
-
- if (!config)
- config = findMatchingConfig(clientAttributes, depth);
-
- return config;
- }
-
- void reset()
- {
- m_surfaceContextFBConfig = 0;
- m_pixmapContextFBConfig = 0;
- }
-
- GLPlatformSurface::SurfaceAttributes attributes() const
- {
- return m_attributes;
- }
-
-private:
- void validateAttributes()
- {
- if (m_attributes & GLPlatformSurface::SupportAlpha) {
- glxSurfaceAttributes[13] = 8;
- glxSurfaceAttributes[5] = GLX_RGBA_BIT;
- }
-
- if (m_attributes & GLPlatformSurface::DoubleBuffered)
- glxSurfaceAttributes[15] = GL_TRUE;
- }
-
- GLXFBConfig findMatchingConfig(const int attributes[], int depth = 32)
- {
- int numAvailableConfigs;
- XUniquePtr<GLXFBConfig> temp(glXChooseFBConfig(X11Helper::nativeDisplay(), DefaultScreen(X11Helper::nativeDisplay()), attributes, &numAvailableConfigs));
-
- if (!numAvailableConfigs || !temp.get())
- return 0;
-
- for (int i = 0; i < numAvailableConfigs; ++i) {
- XUniquePtr<XVisualInfo> scopedVisualInfo { glXGetVisualFromFBConfig(X11Helper::nativeDisplay(), temp.get()[i]) };
- if (!scopedVisualInfo.get())
- continue;
-
-#if USE(GRAPHICS_SURFACE) && USE(GLX)
- if (X11Helper::isXRenderExtensionSupported()) {
- XRenderPictFormat* format = XRenderFindVisualFormat(X11Helper::nativeDisplay(), scopedVisualInfo->visual);
-
- if (format) {
- if (m_attributes & GLPlatformSurface::SupportAlpha) {
- if (scopedVisualInfo->depth == depth && format->direct.alphaMask > 0)
- return temp.get()[i];
- } else if (!format->direct.alphaMask)
- return temp.get()[i];
- }
- }
-#endif
- if (scopedVisualInfo->depth == depth)
- return temp.get()[i];
- }
-
- // Did not find any visual supporting alpha, select the first available config.
- XUniquePtr<XVisualInfo> scopedVisualInfo { glXGetVisualFromFBConfig(X11Helper::nativeDisplay(), temp.get()[0]) };
-
- if ((m_attributes & GLPlatformSurface::SupportAlpha) && (scopedVisualInfo->depth != 32))
- m_attributes &= ~GLPlatformSurface::SupportAlpha;
-
- return temp.get()[0];
- }
-
- GLXFBConfig findMatchingConfigWithVisualId(const int attributes[], int depth, VisualID id)
- {
- int numAvailableConfigs;
- XUniquePtr<GLXFBConfig> temp(glXChooseFBConfig(X11Helper::nativeDisplay(), DefaultScreen(X11Helper::nativeDisplay()), attributes, &numAvailableConfigs));
-
- if (!numAvailableConfigs || !temp.get())
- return 0;
-
- for (int i = 0; i < numAvailableConfigs; ++i) {
- XUniquePtr<XVisualInfo> scopedVisualInfo { glXGetVisualFromFBConfig(X11Helper::nativeDisplay(), temp.get()[i]) };
- if (!scopedVisualInfo.get())
- continue;
-
- if (id && scopedVisualInfo->depth == depth && scopedVisualInfo->visualid == id)
- return temp.get()[i];
- }
-
- return 0;
- }
-
- GLXFBConfig m_surfaceContextFBConfig;
- GLXFBConfig m_pixmapContextFBConfig;
- GLPlatformSurface::SurfaceAttributes m_attributes : 3;
-};
-
-}
-
-#endif
-
-#endif
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxGLXContextcpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXContext.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXContext.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXContext.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,141 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "GLXContext.h"
-
-#if USE(GLX)
-
-#include "X11Helper.h"
-
-namespace WebCore {
-
-typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
-static GLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = 0;
-
-static int Attribs[] = {
- GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB,
- GLX_LOSE_CONTEXT_ON_RESET_ARB,
- 0 };
-
-static void initializeARBExtensions()
-{
- static bool initialized = false;
- if (initialized)
- return;
-
- initialized = true;
- if (GLPlatformContext::supportsGLXExtension(X11Helper::nativeDisplay(), "GLX_ARB_create_context_robustness"))
- glXCreateContextAttribsARB = reinterpret_cast<GLXCREATECONTEXTATTRIBSARBPROC>(glXGetProcAddress(reinterpret_cast<const GLubyte*>("glXCreateContextAttribsARB")));
-}
-
-GLXOffScreenContext::GLXOffScreenContext()
- : GLPlatformContext()
-{
-}
-
-bool GLXOffScreenContext::initialize(GLPlatformSurface* surface, PlatformContext sharedContext)
-{
- if (!surface)
- return false;
-
- Display* x11Display = X11Helper::nativeDisplay();
- if (!x11Display)
- return false;
-
- GLXFBConfig config = surface->configuration();
-
- if (config) {
- initializeARBExtensions();
-
- if (glXCreateContextAttribsARB)
- m_contextHandle = glXCreateContextAttribsARB(x11Display, config, sharedContext, true, Attribs);
-
- if (m_contextHandle) {
- // The GLX_ARB_create_context_robustness spec requires that a context created with
- // GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB bit set must also support GL_ARB_robustness or
- // a version of OpenGL incorporating equivalent functionality.
- // The spec also defines similar requirements for attribute GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB.
- if (platformMakeCurrent(surface) && GLPlatformContext::supportsGLExtension("GL_ARB_robustness"))
- m_resetLostContext = true;
- else
- glXDestroyContext(x11Display, m_contextHandle);
- }
-
- bool supportsAlpha = surface->attributes() & GLPlatformSurface::SupportAlpha;
- if (!m_contextHandle)
- m_contextHandle = glXCreateNewContext(x11Display, config, supportsAlpha ? GLX_RGBA_TYPE : 0, sharedContext, true);
-
- if (m_contextHandle)
- return true;
- }
-
- return false;
-}
-
-GLXOffScreenContext::~GLXOffScreenContext()
-{
-}
-
-bool GLXOffScreenContext::isCurrentContext() const
-{
- return m_contextHandle == glXGetCurrentContext();
-}
-
-bool GLXOffScreenContext::platformMakeCurrent(GLPlatformSurface* surface)
-{
- return glXMakeCurrent(X11Helper::nativeDisplay(), surface->drawable(), m_contextHandle);
-}
-
-void GLXOffScreenContext::platformReleaseCurrent()
-{
- Display* x11Display = X11Helper::nativeDisplay();
- if (!x11Display)
- return;
-
- glXMakeCurrent(x11Display, 0, 0);
-}
-
-void GLXOffScreenContext::freeResources()
-{
- Display* x11Display = X11Helper::nativeDisplay();
- if (!x11Display)
- return;
-
- if (m_contextHandle)
- glXDestroyContext(x11Display, m_contextHandle);
-
- m_contextHandle = 0;
-}
-
-void GLXOffScreenContext::destroy()
-{
- freeResources();
- GLPlatformContext::destroy();
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxGLXContexth"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXContext.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXContext.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXContext.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,54 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef GLXContext_h
-#define GLXContext_h
-
-#if USE(GLX)
-
-#include "GLPlatformContext.h"
-
-namespace WebCore {
-
-class GLXOffScreenContext : public GLPlatformContext {
-
-public:
- GLXOffScreenContext();
- virtual ~GLXOffScreenContext();
- bool initialize(GLPlatformSurface*, PlatformContext) override;
- bool platformMakeCurrent(GLPlatformSurface*) override;
- void platformReleaseCurrent() override;
- void destroy() override;
- bool isCurrentContext() const override;
-
-private:
- void freeResources();
-};
-
-}
-
-#endif // GLXCURRENTCONTEXWRAPPER_H
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxGLXSurfacecpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,292 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "GLXSurface.h"
-
-#if USE(GLX)
-
-#include "XUniquePtr.h"
-
-namespace WebCore {
-
-static PFNGLXBINDTEXIMAGEEXTPROC pGlXBindTexImageEXT = 0;
-static PFNGLXRELEASETEXIMAGEEXTPROC pGlXReleaseTexImageEXT = 0;
-
-static bool resolveGLMethods()
-{
- static bool resolved = false;
- if (resolved)
- return true;
-
- pGlXBindTexImageEXT = reinterpret_cast<PFNGLXBINDTEXIMAGEEXTPROC>(glXGetProcAddress(reinterpret_cast<const GLubyte*>("glXBindTexImageEXT")));
- pGlXReleaseTexImageEXT = reinterpret_cast<PFNGLXRELEASETEXIMAGEEXTPROC>(glXGetProcAddress(reinterpret_cast<const GLubyte*>("glXReleaseTexImageEXT")));
-
- resolved = pGlXBindTexImageEXT && pGlXReleaseTexImageEXT;
-
- return resolved;
-}
-
-static int glxAttributes[] = {
- GLX_TEXTURE_FORMAT_EXT,
- GLX_TEXTURE_FORMAT_RGBA_EXT,
- GLX_TEXTURE_TARGET_EXT,
- GLX_TEXTURE_2D_EXT,
- 0
-};
-
-static bool isMesaGLX()
-{
- static bool isMesa = !!strstr(glXGetClientString(X11Helper::nativeDisplay(), GLX_VENDOR), "Mesa");
- return isMesa;
-}
-
-GLXTransportSurface::GLXTransportSurface(const IntSize& size, SurfaceAttributes attributes)
- : GLTransportSurface(size, attributes)
-{
- attributes |= GLPlatformSurface::DoubleBuffered;
- m_configSelector = std::make_unique<GLXConfigSelector>(attributes);
- XUniquePtr<XVisualInfo> visInfo(m_configSelector->visualInfo(m_configSelector->surfaceContextConfig()));
-
- if (!visInfo.get()) {
- destroy();
- return;
- }
-
- X11Helper::createOffScreenWindow(&m_bufferHandle, *visInfo.get(), size);
-
- if (!m_bufferHandle) {
- destroy();
- return;
- }
-
- m_drawable = m_bufferHandle;
-}
-
-GLXTransportSurface::~GLXTransportSurface()
-{
-}
-
-PlatformSurfaceConfig GLXTransportSurface::configuration()
-{
- return m_configSelector->surfaceContextConfig();
-}
-
-void GLXTransportSurface::setGeometry(const IntRect& newRect)
-{
- GLTransportSurface::setGeometry(newRect);
- X11Helper::resizeWindow(newRect, m_drawable);
- // Force resize of GL surface after window resize.
- glXSwapBuffers(X11Helper::nativeDisplay(), m_drawable);
-}
-
-void GLXTransportSurface::swapBuffers()
-{
- if (!m_drawable)
- return;
-
- glXSwapBuffers(X11Helper::nativeDisplay(), m_drawable);
-}
-
-void GLXTransportSurface::destroy()
-{
- GLTransportSurface::destroy();
-
- if (m_bufferHandle) {
- X11Helper::destroyWindow(m_bufferHandle);
- m_bufferHandle = 0;
- m_drawable = 0;
- }
-
- m_configSelector = nullptr;
-}
-
-GLPlatformSurface::SurfaceAttributes GLXTransportSurface::attributes() const
-{
- return m_configSelector->attributes();
-}
-
-bool GLXTransportSurface::isCurrentDrawable() const
-{
- return m_drawable == glXGetCurrentDrawable();
-}
-
-GLXOffScreenSurface::GLXOffScreenSurface(SurfaceAttributes surfaceAttributes)
- : GLPlatformSurface(surfaceAttributes)
- , m_pixmap(0)
- , m_glxPixmap(0)
-{
- initialize(surfaceAttributes);
-}
-
-GLXOffScreenSurface::~GLXOffScreenSurface()
-{
-}
-
-void GLXOffScreenSurface::initialize(SurfaceAttributes attributes)
-{
- m_configSelector = std::make_unique<GLXConfigSelector>(attributes);
-
- XUniquePtr<XVisualInfo> visualInfo(m_configSelector->visualInfo(m_configSelector->pixmapContextConfig()));
- X11Helper::createPixmap(&m_pixmap, *visualInfo.get());
-
- if (!m_pixmap) {
- destroy();
- return;
- }
-
- m_glxPixmap = glXCreateGLXPixmap(X11Helper::nativeDisplay(), visualInfo.get(), m_pixmap);
-
- if (!m_glxPixmap) {
- destroy();
- return;
- }
-
- m_drawable = m_glxPixmap;
-}
-
-PlatformSurfaceConfig GLXOffScreenSurface::configuration()
-{
- return m_configSelector->pixmapContextConfig();
-}
-
-bool GLXOffScreenSurface::isCurrentDrawable() const
-{
- return m_drawable == glXGetCurrentDrawable();
-}
-
-void GLXOffScreenSurface::destroy()
-{
- freeResources();
-}
-
-void GLXOffScreenSurface::freeResources()
-{
- Display* display = X11Helper::nativeDisplay();
-
- if (!display)
- return;
-
- if (m_glxPixmap) {
- glXDestroyGLXPixmap(display, m_glxPixmap);
- glXWaitGL();
- m_glxPixmap = 0;
- }
-
- if (m_pixmap) {
- X11Helper::destroyPixmap(m_pixmap);
- m_pixmap = 0;
- }
-
- m_configSelector = nullptr;
- m_drawable = 0;
-}
-
-GLXTransportSurfaceClient::GLXTransportSurfaceClient(const PlatformBufferHandle handle, bool hasAlpha)
- : GLTransportSurfaceClient()
-{
- if (!resolveGLMethods())
- return;
-
- XWindowAttributes attr;
- Display* display = X11Helper::nativeDisplay();
- if (!XGetWindowAttributes(display, handle, &attr))
- return;
-
- // Ensure that the window is mapped.
- if (attr.map_state == IsUnmapped || attr.map_state == IsUnviewable)
- return;
-
- ScopedXPixmapCreationErrorHandler handler;
-
- XRenderPictFormat* format = XRenderFindVisualFormat(display, attr.visual);
- m_xPixmap = XCompositeNameWindowPixmap(display, handle);
-
- if (!m_xPixmap)
- return;
-
- glxAttributes[1] = (format->depth == 32 && hasAlpha) ? GLX_TEXTURE_FORMAT_RGBA_EXT : GLX_TEXTURE_FORMAT_RGB_EXT;
-
- GLPlatformSurface::SurfaceAttributes sharedSurfaceAttributes = GLPlatformSurface::Default;
-
- if (hasAlpha)
- sharedSurfaceAttributes = GLPlatformSurface::SupportAlpha;
-
- GLXConfigSelector configSelector(sharedSurfaceAttributes);
-
- m_glxPixmap = glXCreatePixmap(display, configSelector.surfaceClientConfig(format->depth, XVisualIDFromVisual(attr.visual)), m_xPixmap, glxAttributes);
-
- if (!m_glxPixmap || !handler.isValidOperation()) {
- destroy();
- return;
- }
-
- createTexture();
- glXWaitX();
- pGlXBindTexImageEXT(display, m_glxPixmap, GLX_FRONT_EXT, 0);
-}
-
-GLXTransportSurfaceClient::~GLXTransportSurfaceClient()
-{
-}
-
-void GLXTransportSurfaceClient::destroy()
-{
- Display* display = X11Helper::nativeDisplay();
- if (!display)
- return;
-
- if (m_texture) {
- pGlXReleaseTexImageEXT(display, m_glxPixmap, GLX_FRONT_EXT);
- GLTransportSurfaceClient::destroy();
- }
-
- if (m_glxPixmap) {
- glXDestroyPixmap(display, m_glxPixmap);
- m_glxPixmap = 0;
- glXWaitGL();
- }
-
- if (m_xPixmap) {
- X11Helper::destroyPixmap(m_xPixmap);
- m_xPixmap = 0;
- }
-}
-
-void GLXTransportSurfaceClient::prepareTexture()
-{
- if (isMesaGLX() && m_texture) {
- Display* display = X11Helper::nativeDisplay();
- glBindTexture(GL_TEXTURE_2D, m_texture);
- // Mesa doesn't re-bind texture to the front buffer on glXSwapBufer
- // Manually release previous lock and rebind texture to surface to ensure frame updates.
- pGlXReleaseTexImageEXT(display, m_glxPixmap, GLX_FRONT_EXT);
- pGlXBindTexImageEXT(display, m_glxPixmap, GLX_FRONT_EXT, 0);
- }
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxGLXSurfaceh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,87 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef GLXSurface_h
-#define GLXSurface_h
-
-#if USE(GLX)
-
-#include "GLTransportSurface.h"
-#include "GLXConfigSelector.h"
-#include "X11Helper.h"
-
-namespace WebCore {
-
-class GLXTransportSurface : public GLTransportSurface {
-
-public:
- GLXTransportSurface(const IntSize&, SurfaceAttributes);
- virtual ~GLXTransportSurface();
- PlatformSurfaceConfig configuration() override;
- void swapBuffers() override;
- void setGeometry(const IntRect&) override;
- GLPlatformSurface::SurfaceAttributes attributes() const override;
- bool isCurrentDrawable() const override;
- void destroy() override;
-
-private:
- std::unique_ptr<GLXConfigSelector> m_configSelector;
-};
-
-class GLXOffScreenSurface : public GLPlatformSurface {
-
-public:
- GLXOffScreenSurface(SurfaceAttributes);
- virtual ~GLXOffScreenSurface();
- PlatformSurfaceConfig configuration() override;
- bool isCurrentDrawable() const override;
- void destroy() override;
-
-private:
- void initialize(SurfaceAttributes);
- void freeResources();
- std::unique_ptr<GLXConfigSelector> m_configSelector;
- Pixmap m_pixmap;
- GLXPixmap m_glxPixmap;
-};
-
-class GLXTransportSurfaceClient : public GLTransportSurfaceClient {
-
-public:
- GLXTransportSurfaceClient(const PlatformBufferHandle, bool);
- virtual ~GLXTransportSurfaceClient();
- void prepareTexture() override;
- void destroy() override;
-
-private:
- Pixmap m_xPixmap;
- GLXPixmap m_glxPixmap;
-};
-
-}
-
-#endif
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxX11Helpercpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,331 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "X11Helper.h"
-
-#include "PlatformDisplayX11.h"
-#include "XUniquePtr.h"
-
-namespace WebCore {
-
-// Used for handling XError.
-static bool validOperation = true;
-static int handleXPixmapCreationError(Display*, XErrorEvent* event)
-{
- if (event->error_code == BadMatch || event->error_code == BadWindow || event->error_code == BadAlloc) {
- validOperation = false;
-
- switch (event->error_code) {
- case BadMatch:
- LOG_ERROR("BadMatch.");
- break;
- case BadWindow:
- LOG_ERROR("BadWindow.");
- break;
- case BadAlloc:
- LOG_ERROR("BadAlloc.");
- break;
- default:
- break;
- }
- }
-
- return 0;
-}
-
-struct OffScreenRootWindow {
-
- OffScreenRootWindow()
- {
- m_window = 0;
- Display* dpy = X11Helper::nativeDisplay();
- if (!dpy)
- return;
-
- XSetWindowAttributes attributes;
- attributes.override_redirect = true;
- m_window = XCreateSimpleWindow(dpy, XDefaultRootWindow(dpy), -1, -1, 1, 1, 0, BlackPixel(dpy, 0), WhitePixel(dpy, 0));
- // From http://tronche.com/gui/x/xlib/window/attributes/
- XChangeWindowAttributes(dpy, m_window, CWOverrideRedirect, &attributes);
- XMapWindow(dpy, m_window);
-
- if (!m_window)
- LOG_ERROR("Failed to create offscreen root window.");
- }
-
- ~OffScreenRootWindow()
- {
- if (!X11Helper::nativeDisplay())
- return;
-
- if (m_window) {
- XUnmapWindow(X11Helper::nativeDisplay(), m_window);
- XDestroyWindow(X11Helper::nativeDisplay(), m_window);
- m_window = 0;
- }
- }
-
- Window rootWindow()
- {
- return m_window;
- }
-
-private:
- Window m_window;
-};
-
-ScopedXPixmapCreationErrorHandler::ScopedXPixmapCreationErrorHandler()
-{
- // XSync must be called to ensure that current errors are handled by the original handler.
- XSync(X11Helper::nativeDisplay(), false);
- m_previousErrorHandler = XSetErrorHandler(handleXPixmapCreationError);
-}
-
-ScopedXPixmapCreationErrorHandler::~ScopedXPixmapCreationErrorHandler()
-{
- // Restore the original handler.
- XSetErrorHandler(m_previousErrorHandler);
-}
-
-bool ScopedXPixmapCreationErrorHandler::isValidOperation() const
-{
- validOperation = true;
- // XSync is needed to catch possible errors as they are generated asynchronously.
- XSync(X11Helper::nativeDisplay(), false);
- return validOperation;
-}
-
-void X11Helper::resizeWindow(const IntRect& newRect, const uint32_t windowId)
-{
- XResizeWindow(nativeDisplay(), windowId, newRect.width(), newRect.height());
- XFlush(nativeDisplay());
-}
-
-void X11Helper::createPixmap(Pixmap* handleId, const XVisualInfo& visualInfo, const IntSize& size)
-{
- *handleId = 0;
- Display* display = nativeDisplay();
- if (!display)
- return;
-
- if (!visualInfo.visual) {
- LOG_ERROR("Failed to find valid XVisual.");
- return;
- }
-
- Window xWindow = offscreenRootWindow();
- if (!xWindow) {
- LOG_ERROR("Failed to create offscreen root window.");
- return;
- }
-
- Pixmap tempHandleId = XCreatePixmap(display, xWindow, size.width(), size.height(), visualInfo.depth);
-
- if (!tempHandleId) {
- LOG_ERROR("Failed to create offscreen pixmap.");
- return;
- }
-
- *handleId = tempHandleId;
- XSync(X11Helper::nativeDisplay(), false);
-}
-
-void X11Helper::destroyPixmap(const uint32_t pixmapId)
-{
- if (!pixmapId)
- return;
-
- Display* display = nativeDisplay();
- if (!display)
- return;
-
- XFreePixmap(display, pixmapId);
- XSync(X11Helper::nativeDisplay(), false);
-}
-
-void X11Helper::createOffScreenWindow(uint32_t* handleId, const XVisualInfo& visInfo, const IntSize& size)
-{
-#if USE(GRAPHICS_SURFACE)
- Display* display = nativeDisplay();
- if (!display)
- return;
-
- if (!visInfo.visual) {
- LOG_ERROR("Failed to find valid XVisual.");
- return;
- }
-
- Window xWindow = offscreenRootWindow();
- if (!xWindow)
- return;
-
- Colormap cmap = XCreateColormap(display, xWindow, visInfo.visual, AllocNone);
- XSetWindowAttributes attribute;
- attribute.background_pixel = WhitePixel(display, 0);
- attribute.border_pixel = BlackPixel(display, 0);
- attribute.colormap = cmap;
-#if USE(GLX)
- attribute.event_mask = ResizeRedirectMask;
-#endif
- uint32_t tempHandleId = XCreateWindow(display, xWindow, 0, 0, size.width(), size.height(), 0, visInfo.depth, InputOutput, visInfo.visual, CWBackPixel | CWBorderPixel | CWColormap, &attribute);
-
- if (!tempHandleId) {
- LOG_ERROR("Failed to create offscreen window.");
- return;
- }
-
- XSetWindowBackgroundPixmap(display, tempHandleId, 0);
-#if USE(GLX)
- XCompositeRedirectWindow(display, tempHandleId, CompositeRedirectManual);
-#endif
- XMapWindow(display, tempHandleId);
- *handleId = tempHandleId;
-#else
- UNUSED_PARAM(handleId);
- UNUSED_PARAM(visInfo);
- UNUSED_PARAM(size);
-#endif
-}
-
-#if USE(EGL)
-void X11Helper::createOffScreenWindow(uint32_t* handleId, const EGLint id, bool supportsAlpha, const IntSize& size)
-{
-#if USE(GRAPHICS_SURFACE)
- VisualID visualId = static_cast<VisualID>(id);
-
- if (!visualId)
- return;
-
- // EGL has suggested a visual id, so get the rest of the visual info for that id.
- XVisualInfo visualInfoTemplate;
- memset(&visualInfoTemplate, 0, sizeof(XVisualInfo));
- visualInfoTemplate.visualid = visualId;
- int matchingCount = 0;
- XUniquePtr<XVisualInfo> matchingVisuals(XGetVisualInfo(nativeDisplay(), VisualIDMask, &visualInfoTemplate, &matchingCount));
- XVisualInfo* foundVisual = 0;
-
- if (matchingVisuals) {
- for (int i = 0; i< matchingCount; i++) {
- XVisualInfo* temp = &matchingVisuals[i];
- int matchingdepth = supportsAlpha ? 32 : 24;
-
- if (temp->visualid == visualId && temp->depth == matchingdepth) {
- foundVisual = temp;
- break;
- }
- }
-
- if (foundVisual)
- createOffScreenWindow(handleId, *foundVisual, size);
- }
-#else
- UNUSED_PARAM(handleId);
- UNUSED_PARAM(id);
- UNUSED_PARAM(size);
-#endif
-}
-
-void X11Helper::createPixmap(Pixmap* handleId, const EGLint id, bool hasAlpha, const IntSize& size)
-{
- *handleId = 0;
- VisualID visualId = static_cast<VisualID>(id);
-
- if (!visualId)
- return;
-
- // EGL has suggested a visual id, so get the rest of the visual info for that id.
- XVisualInfo visualInfoTemplate;
- memset(&visualInfoTemplate, 0, sizeof(XVisualInfo));
- visualInfoTemplate.visualid = visualId;
- int matchingCount = 0;
- XUniquePtr<XVisualInfo> matchingVisuals(XGetVisualInfo(nativeDisplay(), VisualIDMask, &visualInfoTemplate, &matchingCount));
- XVisualInfo* foundVisual = 0;
- int requiredDepth = hasAlpha ? 32 : 24;
-
- if (matchingVisuals) {
- for (int i = 0; i< matchingCount; i++) {
- XVisualInfo* temp = &matchingVisuals[i];
-
- if (temp->visualid == visualId && temp->depth == requiredDepth) {
- foundVisual = temp;
- break;
- }
- }
-
- if (foundVisual)
- createPixmap(handleId, *foundVisual, size);
- }
-}
-#endif
-
-void X11Helper::destroyWindow(const uint32_t windowId)
-{
- if (!windowId)
- return;
-
- Display* display = nativeDisplay();
- if (!display)
- return;
-
- XWindowAttributes attribute;
- XGetWindowAttributes(display, windowId, &attribute);
-
- XFreeColormap(display, attribute.colormap);
- XDestroyWindow(display, windowId);
-}
-
-bool X11Helper::isXRenderExtensionSupported()
-{
- static bool queryDone = false;
- static bool supportsXRenderExtension = false;
-
- if (!queryDone) {
- queryDone = true;
-#if USE(GRAPHICS_SURFACE) && USE(GLX)
- Display* display = nativeDisplay();
-
- if (display) {
- int eventBasep, errorBasep;
- supportsXRenderExtension = XRenderQueryExtension(display, &eventBasep, &errorBasep);
- }
-#endif
- }
-
- return supportsXRenderExtension;
-}
-
-Display* X11Helper::nativeDisplay()
-{
- return downcast<PlatformDisplayX11>(PlatformDisplay::sharedDisplay()).native();
-}
-
-Window X11Helper::offscreenRootWindow()
-{
- static OffScreenRootWindow offscreenWindow;
- return offscreenWindow.rootWindow();
-}
-
-}
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicssurfacesglxX11Helperh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/X11Helper.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/X11Helper.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/surfaces/glx/X11Helper.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,73 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef X11Helper_h
-#define X11Helper_h
-
-#include "IntRect.h"
-
-#if USE(EGL)
-#include <opengl/GLDefs.h>
-#endif
-
-#if USE(GRAPHICS_SURFACE) && USE(GLX)
-#include <X11/extensions/Xcomposite.h>
-#include <X11/extensions/Xrender.h>
-#else
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#endif
-
-namespace WebCore {
-
-class X11Helper {
-public:
- static void createPixmap(Pixmap*, const XVisualInfo&, const IntSize& = IntSize(1, 1));
- static void createOffScreenWindow(uint32_t*, const XVisualInfo&, const IntSize& = IntSize(1, 1));
-#if USE(EGL)
- static void createPixmap(Pixmap*, const EGLint, bool, const IntSize& = IntSize(1, 1));
- static void createOffScreenWindow(uint32_t*, const EGLint, bool, const IntSize& = IntSize(1, 1));
-#endif
- static void destroyWindow(const uint32_t);
- static void destroyPixmap(const uint32_t);
- static void resizeWindow(const IntRect&, const uint32_t);
- static bool isXRenderExtensionSupported();
- static Display* nativeDisplay();
- static Window offscreenRootWindow();
-};
-
-class ScopedXPixmapCreationErrorHandler {
-public:
- ScopedXPixmapCreationErrorHandler();
- ~ScopedXPixmapCreationErrorHandler();
- bool isValidOperation() const;
-
-private:
- XErrorHandler m_previousErrorHandler;
-};
-
-}
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapTextureMapperBackingStorecpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -25,11 +25,6 @@
</span><span class="cx"> #include "ImageBuffer.h"
</span><span class="cx"> #include "TextureMapper.h"
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-#include "GraphicsSurface.h"
-#include "TextureMapperGL.h"
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> unsigned TextureMapperBackingStore::calculateExposedTileEdges(const FloatRect& totalRect, const FloatRect& tileRect)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapTextureMapperBackingStoreh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -26,10 +26,6 @@
</span><span class="cx"> #include "TextureMapperPlatformLayer.h"
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-#include "GraphicsSurface.h"
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class GraphicsLayer;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapTextureMapperPlatformLayerh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -22,10 +22,6 @@
</span><span class="cx">
</span><span class="cx"> #if USE(TEXTURE_MAPPER)
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-#include "GraphicsSurface.h"
-#endif
-
</del><span class="cx"> #include "TextureMapper.h"
</span><span class="cx"> #include "TransformationMatrix.h"
</span><span class="cx">
</span><span class="lines">@@ -51,12 +47,6 @@
</span><span class="cx"> {
</span><span class="cx"> m_client = client;
</span><span class="cx"> }
</span><del>-#if USE(GRAPHICS_SURFACE)
- virtual IntSize platformLayerSize() const { return IntSize(); }
- virtual uint32_t copyToGraphicsSurface() { return 0; }
- virtual GraphicsSurfaceToken graphicsSurfaceToken() const { return GraphicsSurfaceToken(); }
- virtual GraphicsSurface::Flags graphicsSurfaceFlags() const { return GraphicsSurface::SupportsTextureTarget | GraphicsSurface::SupportsSharing; }
-#endif
</del><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> TextureMapperPlatformLayer::Client* client() { return m_client; }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapTextureMapperSurfaceBackingStorecpp"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,54 +0,0 @@
</span><del>-/*
- Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#if USE(GRAPHICS_SURFACE)
-#include "TextureMapperSurfaceBackingStore.h"
-
-#include "GraphicsSurface.h"
-
-namespace WebCore {
-
-void TextureMapperSurfaceBackingStore::setGraphicsSurface(PassRefPtr<GraphicsSurface> surface)
-{
- m_graphicsSurface = surface;
-}
-
-void TextureMapperSurfaceBackingStore::swapBuffersIfNeeded(uint32_t)
-{
- if (m_graphicsSurface)
- m_graphicsSurface->swapBuffers();
-}
-
-RefPtr<BitmapTexture> TextureMapperSurfaceBackingStore::texture() const
-{
- // FIXME: Instead of just returning an empty texture, we should wrap the texture contents into a BitmapTexture.
- RefPtr<BitmapTexture> emptyTexture;
- return emptyTexture;
-}
-
-void TextureMapperSurfaceBackingStore::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity)
-{
- if (m_graphicsSurface)
- m_graphicsSurface->paintToTextureMapper(textureMapper, targetRect, transform, opacity);
-}
-
-} // namespace WebCore
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapTextureMapperSurfaceBackingStoreh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,55 +0,0 @@
</span><del>-/*
- Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
- */
-
-#ifndef TextureMapperSurfaceBackingStore_h
-#define TextureMapperSurfaceBackingStore_h
-
-#if USE(GRAPHICS_SURFACE)
-
-#include "GraphicsSurface.h"
-#include "TextureMapperBackingStore.h"
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-class TextureMapper;
-class FloatRect;
-
-class TextureMapperSurfaceBackingStore : public TextureMapperBackingStore {
-public:
- static PassRefPtr<TextureMapperSurfaceBackingStore> create() { return adoptRef(new TextureMapperSurfaceBackingStore); }
- void setGraphicsSurface(PassRefPtr<GraphicsSurface>);
- void swapBuffersIfNeeded(uint32_t frontBuffer);
- virtual RefPtr<BitmapTexture> texture() const;
- virtual void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix&, float);
- virtual ~TextureMapperSurfaceBackingStore() { }
-
-private:
- TextureMapperSurfaceBackingStore()
- : TextureMapperBackingStore()
- { }
-
- RefPtr<GraphicsSurface> m_graphicsSurface;
-};
-
-}
-
-#endif
-
-#endif
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -120,10 +120,6 @@
</span><span class="cx"> , m_movingVisibleRect(false)
</span><span class="cx"> , m_pendingContentsScaleAdjustment(false)
</span><span class="cx"> , m_pendingVisibleRectAdjustment(false)
</span><del>-#if USE(GRAPHICS_SURFACE)
- , m_isValidPlatformLayer(false)
- , m_pendingPlatformLayerOperation(None)
-#endif
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS_THREADED)
</span><span class="cx"> , m_shouldSyncPlatformLayer(false)
</span><span class="cx"> , m_shouldUpdatePlatformLayer(false)
</span><span class="lines">@@ -379,11 +375,8 @@
</span><span class="cx">
</span><span class="cx"> void CoordinatedGraphicsLayer::setContentsNeedsDisplay()
</span><span class="cx"> {
</span><del>-#if USE(GRAPHICS_SURFACE)
</del><ins>+#if USE(COORDINATED_GRAPHICS_THREADED)
</ins><span class="cx"> if (m_platformLayer)
</span><del>- m_pendingPlatformLayerOperation |= SyncPlatformLayer;
-#elif USE(COORDINATED_GRAPHICS_THREADED)
- if (m_platformLayer)
</del><span class="cx"> m_shouldUpdatePlatformLayer = true;
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -393,30 +386,7 @@
</span><span class="cx">
</span><span class="cx"> void CoordinatedGraphicsLayer::setContentsToPlatformLayer(PlatformLayer* platformLayer, ContentsLayerPurpose)
</span><span class="cx"> {
</span><del>-#if USE(GRAPHICS_SURFACE)
- if (m_platformLayer) {
- ASSERT(m_platformLayerToken.isValid());
- if (!platformLayer) {
- m_pendingPlatformLayerOperation |= DestroyPlatformLayer;
- m_pendingPlatformLayerOperation &= ~CreatePlatformLayer;
- } else if ((m_platformLayerSize != platformLayer->platformLayerSize()) || (m_platformLayerToken != platformLayer->graphicsSurfaceToken())) {
- // m_platformLayerToken can be different to platformLayer->graphicsSurfaceToken(), even if m_platformLayer equals platformLayer.
- m_pendingPlatformLayerOperation |= RecreatePlatformLayer;
- }
- } else {
- if (platformLayer)
- m_pendingPlatformLayerOperation |= CreateAndSyncPlatformLayer;
- }
-
- m_platformLayer = platformLayer;
- // m_platformLayerToken is updated only here.
- // In detail, when GraphicsContext3D is changed or reshaped, m_platformLayerToken is changed and setContentsToPlatformLayer() is always called.
- m_platformLayerSize = m_platformLayer ? m_platformLayer->platformLayerSize() : IntSize();
- m_platformLayerToken = m_platformLayer ? m_platformLayer->graphicsSurfaceToken() : GraphicsSurfaceToken();
- ASSERT(!(!m_platformLayerToken.isValid() && m_platformLayer));
-
- notifyFlushRequired();
-#elif USE(COORDINATED_GRAPHICS_THREADED)
</del><ins>+#if USE(COORDINATED_GRAPHICS_THREADED)
</ins><span class="cx"> if (m_platformLayer != platformLayer)
</span><span class="cx"> m_shouldSyncPlatformLayer = true;
</span><span class="cx">
</span><span class="lines">@@ -724,22 +694,7 @@
</span><span class="cx">
</span><span class="cx"> void CoordinatedGraphicsLayer::syncPlatformLayer()
</span><span class="cx"> {
</span><del>-#if USE(GRAPHICS_SURFACE)
- destroyPlatformLayerIfNeeded();
- createPlatformLayerIfNeeded();
-
- if (!(m_pendingPlatformLayerOperation & SyncPlatformLayer))
- return;
-
- m_pendingPlatformLayerOperation &= ~SyncPlatformLayer;
-
- if (!m_isValidPlatformLayer)
- return;
-
- ASSERT(m_platformLayer);
- m_layerState.platformLayerFrontBuffer = m_platformLayer->copyToGraphicsSurface();
- m_layerState.platformLayerShouldSwapBuffers = true;
-#elif USE(COORDINATED_GRAPHICS_THREADED)
</del><ins>+#if USE(COORDINATED_GRAPHICS_THREADED)
</ins><span class="cx"> if (!m_shouldSyncPlatformLayer)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -762,39 +717,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-void CoordinatedGraphicsLayer::destroyPlatformLayerIfNeeded()
-{
- if (!(m_pendingPlatformLayerOperation & DestroyPlatformLayer))
- return;
-
- if (m_isValidPlatformLayer) {
- m_isValidPlatformLayer = false;
- m_layerState.platformLayerToken = GraphicsSurfaceToken();
- m_layerState.platformLayerChanged = true;
- }
-
- m_pendingPlatformLayerOperation &= ~DestroyPlatformLayer;
-}
-
-void CoordinatedGraphicsLayer::createPlatformLayerIfNeeded()
-{
- if (!(m_pendingPlatformLayerOperation & CreatePlatformLayer))
- return;
-
- ASSERT(m_platformLayer);
- if (!m_isValidPlatformLayer) {
- m_layerState.platformLayerSize = m_platformLayer->platformLayerSize();
- m_layerState.platformLayerToken = m_platformLayer->graphicsSurfaceToken();
- m_layerState.platformLayerSurfaceFlags = m_platformLayer->graphicsSurfaceFlags();
- m_layerState.platformLayerChanged = true;
- m_isValidPlatformLayer = true;
- }
-
- m_pendingPlatformLayerOperation &= ~CreatePlatformLayer;
-}
-#endif
-
</del><span class="cx"> void CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly()
</span><span class="cx"> {
</span><span class="cx"> // When we have a transform animation, we need to update visible rect every frame to adjust the visible rect of a backing store.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -35,9 +35,6 @@
</span><span class="cx"> #include "TiledBackingStore.h"
</span><span class="cx"> #include "TiledBackingStoreClient.h"
</span><span class="cx"> #include "TransformationMatrix.h"
</span><del>-#if USE(GRAPHICS_SURFACE)
-#include "GraphicsSurfaceToken.h"
-#endif
</del><span class="cx"> #include <wtf/text/StringHash.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -151,19 +148,6 @@
</span><span class="cx"> private:
</span><span class="cx"> bool isCoordinatedGraphicsLayer() const override { return true; }
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
- enum PendingPlatformLayerOperation {
- None = 0x00,
- CreatePlatformLayer = 0x01,
- DestroyPlatformLayer = 0x02,
- SyncPlatformLayer = 0x04,
- CreateAndSyncPlatformLayer = CreatePlatformLayer | SyncPlatformLayer,
- RecreatePlatformLayer = CreateAndSyncPlatformLayer | DestroyPlatformLayer
- };
-
- void destroyPlatformLayerIfNeeded();
- void createPlatformLayerIfNeeded();
-#endif
</del><span class="cx"> void syncPlatformLayer();
</span><span class="cx"> void updatePlatformLayer();
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS_THREADED)
</span><span class="lines">@@ -232,10 +216,6 @@
</span><span class="cx"> bool m_movingVisibleRect : 1;
</span><span class="cx"> bool m_pendingContentsScaleAdjustment : 1;
</span><span class="cx"> bool m_pendingVisibleRectAdjustment : 1;
</span><del>-#if USE(GRAPHICS_SURFACE)
- bool m_isValidPlatformLayer : 1;
- unsigned m_pendingPlatformLayerOperation : 3;
-#endif
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS_THREADED)
</span><span class="cx"> bool m_shouldSyncPlatformLayer : 1;
</span><span class="cx"> bool m_shouldUpdatePlatformLayer : 1;
</span><span class="lines">@@ -250,10 +230,6 @@
</span><span class="cx"> RefPtr<CoordinatedImageBacking> m_coordinatedImageBacking;
</span><span class="cx">
</span><span class="cx"> PlatformLayer* m_platformLayer;
</span><del>-#if USE(GRAPHICS_SURFACE)
- IntSize m_platformLayerSize;
- GraphicsSurfaceToken m_platformLayerToken;
-#endif
</del><span class="cx"> Timer m_animationStartedTimer;
</span><span class="cx"> TextureMapperAnimations m_animations;
</span><span class="cx"> double m_lastAnimationStartTime;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsStateh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -39,11 +39,6 @@
</span><span class="cx"> #include "TextureMapperAnimation.h"
</span><span class="cx"> #include "TransformationMatrix.h"
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-#include "GraphicsSurface.h"
-#include "GraphicsSurfaceToken.h"
-#endif
-
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS_THREADED)
</span><span class="cx"> #include "TextureMapperPlatformLayerProxy.h"
</span><span class="cx"> #endif
</span><span class="lines">@@ -131,9 +126,6 @@
</span><span class="cx"> , replica(InvalidCoordinatedLayerID)
</span><span class="cx"> , mask(InvalidCoordinatedLayerID)
</span><span class="cx"> , imageID(InvalidCoordinatedImageBackingID)
</span><del>-#if USE(GRAPHICS_SURFACE)
- , platformLayerFrontBuffer(0)
-#endif
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS_THREADED)
</span><span class="cx"> , platformLayerProxy(0)
</span><span class="cx"> #endif
</span><span class="lines">@@ -164,13 +156,6 @@
</span><span class="cx"> unsigned repaintCount;
</span><span class="cx"> Vector<TileUpdateInfo> tilesToUpdate;
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
- IntSize platformLayerSize;
- GraphicsSurfaceToken platformLayerToken;
- uint32_t platformLayerFrontBuffer;
- GraphicsSurface::Flags platformLayerSurfaceFlags;
-#endif
-
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS_THREADED)
</span><span class="cx"> RefPtr<TextureMapperPlatformLayerProxy> platformLayerProxy;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -1,5 +1,33 @@
</span><span class="cx"> 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><ins>+ Remove code under USE(GRAPHICS_SURFACE)
+ https://bugs.webkit.org/show_bug.cgi?id=168592
+
+ Reviewed by Michael Catanzaro.
+
+ This was only used by EFL port.
+
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
+ (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
+ (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
+ (WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
+ (WebKit::CoordinatedGraphicsScene::deleteLayer):
+ (WebKit::CoordinatedGraphicsScene::assignImageBackingToLayer):
+ (WebKit::CoordinatedGraphicsScene::purgeGLResources):
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
+ * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
+ (WebKit::WebCoordinatedSurface::Handle::encode):
+ (WebKit::WebCoordinatedSurface::Handle::decode):
+ (WebKit::WebCoordinatedSurface::create):
+ (WebKit::WebCoordinatedSurface::createGraphicsContext):
+ (WebKit::WebCoordinatedSurface::createHandle):
+ (WebKit::WebCoordinatedSurface::copyToTexture):
+ * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
+
+2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
+
</ins><span class="cx"> Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.90 release.
</span><span class="cx">
</span><span class="cx"> * gtk/NEWS: Add release notes for 2.15.90.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsCoordinatedGraphicsArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -51,10 +51,6 @@
</span><span class="cx"> #include <WebCore/TransformationMatrix.h>
</span><span class="cx"> #include <WebCore/TranslateTransformOperation.h>
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-#include <WebCore/GraphicsSurface.h>
-#endif
-
</del><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span><span class="cx">
</span><span class="lines">@@ -585,17 +581,6 @@
</span><span class="cx"> return decoder.decode(animations.animations());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-void ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode(Encoder& encoder, const WebCore::GraphicsSurfaceToken& token)
-{
-#if OS(DARWIN)
- encoder << Attachment(token.frontBufferHandle, MACH_MSG_TYPE_MOVE_SEND);
- encoder << Attachment(token.backBufferHandle, MACH_MSG_TYPE_MOVE_SEND);
-#elif OS(LINUX)
- encoder << token.frontBufferHandle;
-#endif
-}
-
</del><span class="cx"> bool ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode(Decoder& decoder, WebCore::GraphicsSurfaceToken& token)
</span><span class="cx"> {
</span><span class="cx"> #if OS(DARWIN)
</span><span class="lines">@@ -692,15 +677,6 @@
</span><span class="cx">
</span><span class="cx"> encoder << state.tilesToUpdate;
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
- if (state.platformLayerChanged) {
- encoder << state.platformLayerSize;
- encoder << state.platformLayerToken;
- encoder << state.platformLayerFrontBuffer;
- encoder << state.platformLayerSurfaceFlags;
- }
-#endif
-
</del><span class="cx"> if (state.committedScrollOffsetChanged)
</span><span class="cx"> encoder << state.committedScrollOffset;
</span><span class="cx"> }
</span><span class="lines">@@ -780,22 +756,6 @@
</span><span class="cx"> if (!decoder.decode(state.tilesToUpdate))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
- if (state.platformLayerChanged) {
- if (!decoder.decode(state.platformLayerSize))
- return false;
-
- if (!decoder.decode(state.platformLayerToken))
- return false;
-
- if (!decoder.decode(state.platformLayerFrontBuffer))
- return false;
-
- if (!decoder.decode(state.platformLayerSurfaceFlags))
- return false;
- }
-#endif
-
</del><span class="cx"> if (state.committedScrollOffsetChanged && !decoder.decode(state.committedScrollOffset))
</span><span class="cx"> return false;
</span><span class="cx">
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsCoordinatedGraphicsArgumentCodersh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -45,10 +45,6 @@
</span><span class="cx"> struct Length;
</span><span class="cx">
</span><span class="cx"> class FilterOperations;
</span><del>-
-#if USE(GRAPHICS_SURFACE)
-struct GraphicsSurfaceToken;
-#endif
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> namespace IPC {
</span><span class="lines">@@ -73,13 +69,6 @@
</span><span class="cx"> static bool decode(Decoder&, WebCore::TextureMapperAnimation&);
</span><span class="cx"> };
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-template<> struct ArgumentCoder<WebCore::GraphicsSurfaceToken> {
- static void encode(Encoder&, const WebCore::GraphicsSurfaceToken&);
- static bool decode(Decoder&, WebCore::GraphicsSurfaceToken&);
-};
-#endif
-
</del><span class="cx"> template<> struct ArgumentCoder<WebCore::SurfaceUpdateInfo> {
</span><span class="cx"> static void encode(Encoder&, const WebCore::SurfaceUpdateInfo&);
</span><span class="cx"> static bool decode(Decoder&, WebCore::SurfaceUpdateInfo&);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsCoordinatedGraphicsScenecpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -177,21 +177,7 @@
</span><span class="cx">
</span><span class="cx"> void CoordinatedGraphicsScene::syncPlatformLayerIfNeeded(TextureMapperLayer* layer, const CoordinatedGraphicsLayerState& state)
</span><span class="cx"> {
</span><del>-#if USE(GRAPHICS_SURFACE)
- ASSERT(m_textureMapper);
-
- if (state.platformLayerChanged) {
- destroyPlatformLayerIfNeeded(layer, state);
- createPlatformLayerIfNeeded(layer, state);
- }
-
- if (state.platformLayerShouldSwapBuffers) {
- ASSERT(m_surfaceBackingStores.contains(layer));
- SurfaceBackingStoreMap::iterator it = m_surfaceBackingStores.find(layer);
- RefPtr<TextureMapperSurfaceBackingStore> platformLayerBackingStore = it->value;
- platformLayerBackingStore->swapBuffersIfNeeded(state.platformLayerFrontBuffer);
- }
-#elif USE(COORDINATED_GRAPHICS_THREADED)
</del><ins>+#if USE(COORDINATED_GRAPHICS_THREADED)
</ins><span class="cx"> if (!state.platformLayerChanged)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -213,28 +199,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-void CoordinatedGraphicsScene::createPlatformLayerIfNeeded(TextureMapperLayer* layer, const CoordinatedGraphicsLayerState& state)
-{
- if (!state.platformLayerToken.isValid())
- return;
-
- RefPtr<TextureMapperSurfaceBackingStore> platformLayerBackingStore(TextureMapperSurfaceBackingStore::create());
- m_surfaceBackingStores.set(layer, platformLayerBackingStore);
- platformLayerBackingStore->setGraphicsSurface(GraphicsSurface::create(state.platformLayerSize, state.platformLayerSurfaceFlags, state.platformLayerToken));
- layer->setContentsLayer(platformLayerBackingStore.get());
-}
-
-void CoordinatedGraphicsScene::destroyPlatformLayerIfNeeded(TextureMapperLayer* layer, const CoordinatedGraphicsLayerState& state)
-{
- if (state.platformLayerToken.isValid())
- return;
-
- m_surfaceBackingStores.remove(layer);
- layer->setContentsLayer(0);
-}
-#endif
-
</del><span class="cx"> void CoordinatedGraphicsScene::setLayerRepaintCountIfNeeded(TextureMapperLayer* layer, const CoordinatedGraphicsLayerState& state)
</span><span class="cx"> {
</span><span class="cx"> if (!layer->isShowingRepaintCounter() || !state.repaintCountChanged)
</span><span class="lines">@@ -380,9 +344,6 @@
</span><span class="cx">
</span><span class="cx"> m_backingStores.remove(layer.get());
</span><span class="cx"> m_fixedLayers.remove(layerID);
</span><del>-#if USE(GRAPHICS_SURFACE)
- m_surfaceBackingStores.remove(layer.get());
-#endif
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS_THREADED)
</span><span class="cx"> if (auto platformLayerProxy = m_platformLayerProxies.take(layer.get()))
</span><span class="cx"> platformLayerProxy->invalidate();
</span><span class="lines">@@ -568,11 +529,6 @@
</span><span class="cx">
</span><span class="cx"> void CoordinatedGraphicsScene::assignImageBackingToLayer(TextureMapperLayer* layer, CoordinatedImageBackingID imageID)
</span><span class="cx"> {
</span><del>-#if USE(GRAPHICS_SURFACE)
- if (m_surfaceBackingStores.contains(layer))
- return;
-#endif
-
</del><span class="cx"> if (imageID == InvalidCoordinatedImageBackingID) {
</span><span class="cx"> layer->setContentsLayer(0);
</span><span class="cx"> return;
</span><span class="lines">@@ -672,9 +628,6 @@
</span><span class="cx">
</span><span class="cx"> m_imageBackings.clear();
</span><span class="cx"> m_releasedImageBackings.clear();
</span><del>-#if USE(GRAPHICS_SURFACE)
- m_surfaceBackingStores.clear();
-#endif
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS_THREADED)
</span><span class="cx"> for (auto& proxy : m_platformLayerProxies.values())
</span><span class="cx"> proxy->invalidate();
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsCoordinatedGraphicsSceneh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -40,11 +40,6 @@
</span><span class="cx"> #include <wtf/ThreadingPrimitives.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-#include <WebCore/GraphicsSurface.h>
-#include <WebCore/TextureMapperSurfaceBackingStore.h>
-#endif
-
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS_THREADED)
</span><span class="cx"> #include <WebCore/TextureMapperPlatformLayerProxy.h>
</span><span class="cx"> #endif
</span><span class="lines">@@ -102,10 +97,6 @@
</span><span class="cx"> void setLayerFiltersIfNeeded(WebCore::TextureMapperLayer*, const WebCore::CoordinatedGraphicsLayerState&);
</span><span class="cx"> void setLayerAnimationsIfNeeded(WebCore::TextureMapperLayer*, const WebCore::CoordinatedGraphicsLayerState&);
</span><span class="cx"> void syncPlatformLayerIfNeeded(WebCore::TextureMapperLayer*, const WebCore::CoordinatedGraphicsLayerState&);
</span><del>-#if USE(GRAPHICS_SURFACE)
- void createPlatformLayerIfNeeded(WebCore::TextureMapperLayer*, const WebCore::CoordinatedGraphicsLayerState&);
- void destroyPlatformLayerIfNeeded(WebCore::TextureMapperLayer*, const WebCore::CoordinatedGraphicsLayerState&);
-#endif
</del><span class="cx"> void setLayerRepaintCountIfNeeded(WebCore::TextureMapperLayer*, const WebCore::CoordinatedGraphicsLayerState&);
</span><span class="cx">
</span><span class="cx"> void syncUpdateAtlases(const WebCore::CoordinatedGraphicsState&);
</span><span class="lines">@@ -167,11 +158,6 @@
</span><span class="cx">
</span><span class="cx"> HashSet<RefPtr<CoordinatedBackingStore>> m_backingStoresWithPendingBuffers;
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
- typedef HashMap<WebCore::TextureMapperLayer*, RefPtr<WebCore::TextureMapperSurfaceBackingStore>> SurfaceBackingStoreMap;
- SurfaceBackingStoreMap m_surfaceBackingStores;
-#endif
-
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS_THREADED)
</span><span class="cx"> typedef HashMap<WebCore::TextureMapperLayer*, RefPtr<WebCore::TextureMapperPlatformLayerProxy>> PlatformLayerProxyMap;
</span><span class="cx"> PlatformLayerProxyMap m_platformLayerProxies;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsWebCoordinatedSurfacecpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -43,11 +43,6 @@
</span><span class="cx"> void WebCoordinatedSurface::Handle::encode(IPC::Encoder& encoder) const
</span><span class="cx"> {
</span><span class="cx"> encoder << m_size << m_flags;
</span><del>-#if USE(GRAPHICS_SURFACE)
- encoder << m_graphicsSurfaceToken;
- if (m_graphicsSurfaceToken.isValid())
- return;
-#endif
</del><span class="cx"> encoder << m_bitmapHandle;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -57,12 +52,6 @@
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(handle.m_flags))
</span><span class="cx"> return false;
</span><del>-#if USE(GRAPHICS_SURFACE)
- if (!decoder.decode(handle.m_graphicsSurfaceToken))
- return false;
- if (handle.m_graphicsSurfaceToken.isValid())
- return true;
-#endif
</del><span class="cx"> if (!decoder.decode(handle.m_bitmapHandle))
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -71,11 +60,6 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<WebCoordinatedSurface> WebCoordinatedSurface::create(const IntSize& size, CoordinatedSurface::Flags flags)
</span><span class="cx"> {
</span><del>-#if USE(GRAPHICS_SURFACE)
- if (auto surface = createWithSurface(size, flags))
- return surface;
-#endif
-
</del><span class="cx"> if (auto bitmap = ShareableBitmap::createShareable(size, (flags & SupportsAlpha) ? ShareableBitmap::SupportsAlpha : ShareableBitmap::NoFlags))
</span><span class="cx"> return create(size, flags, WTFMove(bitmap));
</span><span class="cx">
</span><span class="lines">@@ -82,34 +66,8 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-RefPtr<WebCoordinatedSurface> WebCoordinatedSurface::createWithSurface(const IntSize& size, CoordinatedSurface::Flags flags)
-{
- GraphicsSurface::Flags surfaceFlags =
- GraphicsSurface::SupportsSoftwareWrite
- | GraphicsSurface::SupportsCopyToTexture
- | GraphicsSurface::SupportsSharing;
-
- if (flags & SupportsAlpha)
- surfaceFlags |= GraphicsSurface::SupportsAlpha;
-
- // This might return null, if the system is unable to provide a new graphics surface.
- // In that case, this function would return null and allow falling back to ShareableBitmap.
- RefPtr<GraphicsSurface> surface = GraphicsSurface::create(size, surfaceFlags);
- if (!surface)
- return nullptr;
-
- return adoptRef(new WebCoordinatedSurface(size, flags, WTFMove(surface)));
-}
-#endif
-
</del><span class="cx"> std::unique_ptr<GraphicsContext> WebCoordinatedSurface::createGraphicsContext(const IntRect& rect)
</span><span class="cx"> {
</span><del>-#if USE(GRAPHICS_SURFACE)
- if (isBackedByGraphicsSurface())
- return m_graphicsSurface->beginPaint(rect, 0 /* Write without retaining pixels*/);
-#endif
-
</del><span class="cx"> ASSERT(m_bitmap);
</span><span class="cx"> auto graphicsContext = m_bitmap->createGraphicsContext();
</span><span class="cx"> graphicsContext->clip(rect);
</span><span class="lines">@@ -128,19 +86,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-WebCoordinatedSurface::WebCoordinatedSurface(const WebCore::IntSize& size, CoordinatedSurface::Flags flags, RefPtr<WebCore::GraphicsSurface> surface)
- : CoordinatedSurface(size, flags)
- , m_graphicsSurface(surface)
-{
-}
-
-Ref<WebCoordinatedSurface> WebCoordinatedSurface::create(const IntSize& size, CoordinatedSurface::Flags flags, RefPtr<GraphicsSurface> surface)
-{
- return adoptRef(*new WebCoordinatedSurface(size, flags, surface));
-}
-#endif
-
</del><span class="cx"> WebCoordinatedSurface::~WebCoordinatedSurface()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -147,17 +92,6 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<WebCoordinatedSurface> WebCoordinatedSurface::create(const Handle& handle)
</span><span class="cx"> {
</span><del>-#if USE(GRAPHICS_SURFACE)
- if (handle.graphicsSurfaceToken().isValid()) {
- GraphicsSurface::Flags surfaceFlags = 0;
- if (handle.m_flags & SupportsAlpha)
- surfaceFlags |= GraphicsSurface::SupportsAlpha;
- RefPtr<GraphicsSurface> surface = GraphicsSurface::create(handle.m_size, surfaceFlags, handle.m_graphicsSurfaceToken);
- if (surface)
- return adoptRef(new WebCoordinatedSurface(handle.m_size, handle.m_flags, WTFMove(surface)));
- }
-#endif
-
</del><span class="cx"> RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(handle.m_bitmapHandle);
</span><span class="cx"> if (!bitmap)
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -170,11 +104,6 @@
</span><span class="cx"> handle.m_size = m_size;
</span><span class="cx"> handle.m_flags = m_flags;
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
- handle.m_graphicsSurfaceToken = m_graphicsSurface ? m_graphicsSurface->exportToken() : GraphicsSurfaceToken();
- if (handle.m_graphicsSurfaceToken.isValid())
- return true;
-#endif
</del><span class="cx"> if (!m_bitmap->createHandle(handle.m_bitmapHandle))
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -192,22 +121,6 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<BitmapTexture> texture(passTexture);
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
- if (isBackedByGraphicsSurface()) {
- RefPtr<BitmapTextureGL> textureGL = toBitmapTextureGL(texture.get());
- if (textureGL) {
- uint32_t textureID = textureGL->id();
- uint32_t textureTarget = textureGL->textureTarget();
- m_graphicsSurface->copyToGLTexture(textureTarget, textureID, target, sourceOffset);
- return;
- }
-
- RefPtr<Image> image = m_graphicsSurface->createReadOnlyImage(IntRect(sourceOffset, target.size()));
- texture->updateContents(image.get(), target, IntPoint::zero(), BitmapTexture::UpdateCanModifyOriginalImageData);
- return;
- }
-#endif
-
</del><span class="cx"> ASSERT(m_bitmap);
</span><span class="cx"> RefPtr<Image> image = m_bitmap->createImage();
</span><span class="cx"> texture->updateContents(image.get(), target, sourceOffset, BitmapTexture::UpdateCanModifyOriginalImageData);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit216SourceWebKit2SharedCoordinatedGraphicsWebCoordinatedSurfaceh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h (212704 => 212705)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h        2017-02-21 08:19:34 UTC (rev 212704)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h        2017-02-21 08:38:29 UTC (rev 212705)
</span><span class="lines">@@ -25,10 +25,6 @@
</span><span class="cx"> #include "ShareableBitmap.h"
</span><span class="cx"> #include <WebCore/CoordinatedSurface.h>
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
-#include "GraphicsSurface.h"
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> class BitmapTexture;
</span><span class="cx"> class GraphicsContext;
</span><span class="lines">@@ -46,16 +42,9 @@
</span><span class="cx"> void encode(IPC::Encoder&) const;
</span><span class="cx"> static bool decode(IPC::Decoder&, Handle&);
</span><span class="cx">
</span><del>-#if USE(GRAPHICS_SURFACE)
- WebCore::GraphicsSurfaceToken graphicsSurfaceToken() const { return m_graphicsSurfaceToken; }
-#endif
-
</del><span class="cx"> private:
</span><span class="cx"> friend class WebCoordinatedSurface;
</span><span class="cx"> mutable ShareableBitmap::Handle m_bitmapHandle;
</span><del>-#if USE(GRAPHICS_SURFACE)
- WebCore::GraphicsSurfaceToken m_graphicsSurfaceToken;
-#endif
</del><span class="cx"> WebCore::IntSize m_size;
</span><span class="cx"> WebCore::CoordinatedSurface::Flags m_flags;
</span><span class="cx"> };
</span><span class="lines">@@ -84,21 +73,8 @@
</span><span class="cx"> static Ref<WebCoordinatedSurface> create(const WebCore::IntSize&, Flags, RefPtr<ShareableBitmap>);
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<WebCore::GraphicsContext> createGraphicsContext(const WebCore::IntRect&);
</span><del>-#if USE(GRAPHICS_SURFACE)
- WebCoordinatedSurface(const WebCore::IntSize&, Flags, RefPtr<WebCore::GraphicsSurface>);
- // Create a shareable bitmap backed by a graphics surface.
- static RefPtr<WebCoordinatedSurface> createWithSurface(const WebCore::IntSize&, Flags);
- // Create a WebCoordinatedSurface referencing an existing GraphicsSurface.
- static Ref<WebCoordinatedSurface> create(const WebCore::IntSize&, Flags, RefPtr<WebCore::GraphicsSurface>);
</del><span class="cx">
</span><del>- bool isBackedByGraphicsSurface() const { return !!m_graphicsSurface; }
-#endif
-
</del><span class="cx"> RefPtr<ShareableBitmap> m_bitmap;
</span><del>-
-#if USE(GRAPHICS_SURFACE)
- RefPtr<WebCore::GraphicsSurface> m_graphicsSurface;
-#endif
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>
</body>
</html>