| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 2 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 if (surface->drawable()) | 48 if (surface->drawable()) |
| 49 return surface.release(); | 49 return surface.release(); |
| 50 #else | 50 #else |
| 51 UNUSED_PARAM(attributes); | 51 UNUSED_PARAM(attributes); |
| 52 #endif | 52 #endif |
| 53 | 53 |
| 54 return nullptr; | 54 return nullptr; |
| 55 } | 55 } |
| 56 | 56 |
| 57 PassOwnPtr<GLPlatformSurface> GLPlatformSurface::createTransportSurface(SurfaceA
ttributes attributes) |
| 58 { |
| 59 #if USE(GLX) |
| 60 OwnPtr<GLPlatformSurface> surface = adoptPtr(new GLXTransportSurface(attribu
tes)); |
| 61 #elif USE(EGL) |
| 62 OwnPtr<GLPlatformSurface> surface = adoptPtr(new EGLWindowTransportSurface(a
ttributes)); |
| 63 #endif |
| 64 |
| 65 if (surface && surface->handle() && surface->drawable()) |
| 66 return surface.release(); |
| 67 |
| 68 return nullptr; |
| 69 } |
| 70 |
| 57 GLPlatformSurface::GLPlatformSurface(SurfaceAttributes) | 71 GLPlatformSurface::GLPlatformSurface(SurfaceAttributes) |
| 58 : m_sharedDisplay(0) | 72 : m_sharedDisplay(0) |
| 59 , m_drawable(0) | 73 , m_drawable(0) |
| 60 , m_bufferHandle(0) | 74 , m_bufferHandle(0) |
| 61 { | 75 { |
| 62 } | 76 } |
| 63 | 77 |
| 64 GLPlatformSurface::~GLPlatformSurface() | 78 GLPlatformSurface::~GLPlatformSurface() |
| 65 { | 79 { |
| 66 } | 80 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 122 } |
| 109 | 123 |
| 110 GLPlatformSurface::SurfaceAttributes GLPlatformSurface::attributes() const | 124 GLPlatformSurface::SurfaceAttributes GLPlatformSurface::attributes() const |
| 111 { | 125 { |
| 112 return GLPlatformSurface::Default; | 126 return GLPlatformSurface::Default; |
| 113 } | 127 } |
| 114 | 128 |
| 115 } | 129 } |
| 116 | 130 |
| 117 #endif | 131 #endif |
| OLD | NEW |