| 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 25 matching lines...) Expand all Loading... |
| 36 // specific management. | 36 // specific management. |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 class GLPlatformSurface { | 39 class GLPlatformSurface { |
| 40 WTF_MAKE_NONCOPYABLE(GLPlatformSurface); | 40 WTF_MAKE_NONCOPYABLE(GLPlatformSurface); |
| 41 | 41 |
| 42 public: | 42 public: |
| 43 enum Attributes { | 43 enum Attributes { |
| 44 Default = 0x00, // No Alpha channel. Only R,G,B values set. | 44 Default = 0x00, // No Alpha channel. Only R,G,B values set. |
| 45 SupportAlpha = 0x01, | 45 SupportAlpha = 0x01, |
| 46 DoubleBuffered = 0x02 | 46 DoubleBuffered = 0x04 |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 typedef unsigned SurfaceAttributes; | 49 typedef int SurfaceAttributes; |
| 50 // Creates a GL surface used for offscreen rendering. | 50 // Creates a GL surface used for offscreen rendering. |
| 51 static PassOwnPtr<GLPlatformSurface> createOffScreenSurface(SurfaceAttribute
s = GLPlatformSurface::Default); | 51 static PassOwnPtr<GLPlatformSurface> createOffScreenSurface(SurfaceAttribute
s = GLPlatformSurface::Default); |
| 52 | 52 |
| 53 // Creates a GL surface used for offscreen rendering. The results can be tra
nsported |
| 54 // to the UI process for display. |
| 55 static PassOwnPtr<GLPlatformSurface> createTransportSurface(SurfaceAttribute
s = GLPlatformSurface::Default); |
| 56 |
| 53 virtual ~GLPlatformSurface(); | 57 virtual ~GLPlatformSurface(); |
| 54 | 58 |
| 55 const IntRect& geometry() const; | 59 const IntRect& geometry() const; |
| 56 | 60 |
| 57 // Get the underlying platform specific buffer handle. | 61 // Get the underlying platform specific buffer handle. |
| 58 // The handle will be null if surface doesn't support | 62 // The handle will be null if surface doesn't support |
| 59 // buffer sharing. | 63 // buffer sharing. |
| 60 PlatformBufferHandle handle() const; | 64 PlatformBufferHandle handle() const; |
| 61 | 65 |
| 62 PlatformDrawable drawable() const; | 66 PlatformDrawable drawable() const; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 88 PlatformBufferHandle m_bufferHandle; | 92 PlatformBufferHandle m_bufferHandle; |
| 89 IntRect m_rect; | 93 IntRect m_rect; |
| 90 }; | 94 }; |
| 91 | 95 |
| 92 } | 96 } |
| 93 | 97 |
| 94 #endif | 98 #endif |
| 95 | 99 |
| 96 #endif | 100 #endif |
| 97 | 101 |
| OLD | NEW |