| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. 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 24 matching lines...) Expand all Loading... |
| 35 class WebGLRenderingContext; | 35 class WebGLRenderingContext; |
| 36 | 36 |
| 37 // WebGLContextObject the base class for objects that are owned by a specific | 37 // WebGLContextObject the base class for objects that are owned by a specific |
| 38 // WebGLRenderingContext. | 38 // WebGLRenderingContext. |
| 39 class WebGLContextObject : public WebGLObject { | 39 class WebGLContextObject : public WebGLObject { |
| 40 public: | 40 public: |
| 41 virtual ~WebGLContextObject(); | 41 virtual ~WebGLContextObject(); |
| 42 | 42 |
| 43 WebGLRenderingContext* context() const { return m_context; } | 43 WebGLRenderingContext* context() const { return m_context; } |
| 44 | 44 |
| 45 virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContext*
context) const | 45 bool validate(const WebGLContextGroup*, const WebGLRenderingContext* context
) const |
| 46 { | 46 { |
| 47 return context == m_context; | 47 return context == m_context; |
| 48 } | 48 } |
| 49 | 49 |
| 50 void detachContext(); | 50 void detachContext(); |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 WebGLContextObject(WebGLRenderingContext*); | 53 WebGLContextObject(WebGLRenderingContext*); |
| 54 | 54 |
| 55 virtual bool hasGroupOrContext() const | 55 virtual bool hasGroupOrContext() const |
| 56 { | 56 { |
| 57 return m_context; | 57 return m_context; |
| 58 } | 58 } |
| 59 | 59 |
| 60 virtual GraphicsContext3D* getAGraphicsContext3D() const; | 60 virtual GraphicsContext3D* getAGraphicsContext3D() const; |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 WebGLRenderingContext* m_context; | 63 WebGLRenderingContext* m_context; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace WebCore | 66 } // namespace WebCore |
| 67 | 67 |
| 68 #endif // WebGLContextObject_h | 68 #endif // WebGLContextObject_h |
| OLD | NEW |