|
Lines 43-59
namespace WebCore {
a/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp_sec1
|
| 43 |
static const GLfloat vertices[] = { 0, 0, 1, 0, 1, 1, 0, 1 }; |
43 |
static const GLfloat vertices[] = { 0, 0, 1, 0, 1, 1, 0, 1 }; |
| 44 |
static bool vertexArrayObjectSupported = false; |
44 |
static bool vertexArrayObjectSupported = false; |
| 45 |
|
45 |
|
| 46 |
PassOwnPtr<GLTransportSurface> GLTransportSurface::createTransportSurface(const IntSize& size, SurfaceAttributes attributes) |
46 |
std::unique_ptr<GLTransportSurface> GLTransportSurface::createTransportSurface(const IntSize& size, SurfaceAttributes attributes) |
| 47 |
{ |
47 |
{ |
| 48 |
OwnPtr<GLTransportSurface> surface; |
48 |
std::unique_ptr<GLTransportSurface> surface; |
| 49 |
#if USE(GLX) |
49 |
#if USE(GLX) |
| 50 |
surface = adoptPtr(new GLXTransportSurface(size, attributes)); |
50 |
surface = std::make_unique<GLXTransportSurface>(size, attributes); |
| 51 |
#elif USE(EGL) |
51 |
#elif USE(EGL) |
| 52 |
surface = EGLTransportSurface::createTransportSurface(size, attributes); |
52 |
surface = EGLTransportSurface::createTransportSurface(size, attributes); |
| 53 |
#endif |
53 |
#endif |
| 54 |
|
54 |
|
| 55 |
if (surface && surface->handle() && surface->drawable()) |
55 |
if (surface && surface->handle() && surface->drawable()) |
| 56 |
return surface.release(); |
56 |
return WTF::move(surface); |
| 57 |
|
57 |
|
| 58 |
return nullptr; |
58 |
return nullptr; |
| 59 |
} |
59 |
} |
|
Lines 205-215
void GLTransportSurface::initializeShaderProgram()
a/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp_sec2
|
| 205 |
updateTransformationMatrix(); |
205 |
updateTransformationMatrix(); |
| 206 |
} |
206 |
} |
| 207 |
|
207 |
|
| 208 |
PassOwnPtr<GLTransportSurfaceClient> GLTransportSurfaceClient::createTransportSurfaceClient(const PlatformBufferHandle handle, const IntSize& size, bool hasAlpha) |
208 |
std::unique_ptr<GLTransportSurfaceClient> GLTransportSurfaceClient::createTransportSurfaceClient(const PlatformBufferHandle handle, const IntSize& size, bool hasAlpha) |
| 209 |
{ |
209 |
{ |
| 210 |
OwnPtr<GLTransportSurfaceClient> client; |
210 |
std::unique_ptr<GLTransportSurfaceClient> client; |
| 211 |
#if USE(GLX) |
211 |
#if USE(GLX) |
| 212 |
client = adoptPtr(new GLXTransportSurfaceClient(handle, hasAlpha)); |
212 |
client = std::make_unique<GLXTransportSurfaceClient>(handle, hasAlpha); |
| 213 |
UNUSED_PARAM(size); |
213 |
UNUSED_PARAM(size); |
| 214 |
#else |
214 |
#else |
| 215 |
client = EGLTransportSurface::createTransportSurfaceClient(handle, size, hasAlpha); |
215 |
client = EGLTransportSurface::createTransportSurfaceClient(handle, size, hasAlpha); |
|
Lines 220-226
PassOwnPtr<GLTransportSurfaceClient> GLTransportSurfaceClient::createTransportSu
a/Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp_sec3
|
| 220 |
return nullptr; |
220 |
return nullptr; |
| 221 |
} |
221 |
} |
| 222 |
|
222 |
|
| 223 |
return client.release(); |
223 |
return WTF::move(client); |
| 224 |
} |
224 |
} |
| 225 |
|
225 |
|
| 226 |
|
226 |
|