| 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 27 matching lines...) Expand all Loading... |
| 38 class WebGLSharedObject; | 38 class WebGLSharedObject; |
| 39 class WebGLRenderingContext; | 39 class WebGLRenderingContext; |
| 40 | 40 |
| 41 typedef int ExceptionCode; | 41 typedef int ExceptionCode; |
| 42 | 42 |
| 43 class WebGLContextGroup : public RefCounted<WebGLContextGroup> { | 43 class WebGLContextGroup : public RefCounted<WebGLContextGroup> { |
| 44 public: | 44 public: |
| 45 static PassRefPtr<WebGLContextGroup> create(); | 45 static PassRefPtr<WebGLContextGroup> create(); |
| 46 virtual ~WebGLContextGroup(); | 46 virtual ~WebGLContextGroup(); |
| 47 | 47 |
| 48 // Adds the context to this group. |
| 48 void addContext(WebGLRenderingContext*); | 49 void addContext(WebGLRenderingContext*); |
| 49 void removeContext(WebGLRenderingContext*); | 50 void removeContext(WebGLRenderingContext*); |
| 50 | 51 |
| 51 void addObject(WebGLSharedObject*); | 52 void addObject(WebGLSharedObject*); |
| 52 void removeObject(WebGLSharedObject*); | 53 void removeObject(WebGLSharedObject*); |
| 53 | 54 |
| 54 GraphicsContext3D* getAGraphicsContext3D(); | 55 GraphicsContext3D* getAGraphicsContext3D(); |
| 55 | 56 |
| 56 void loseContextGroup(WebGLRenderingContext::LostContextMode); | 57 void loseContextGroup(WebGLRenderingContext::LostContextMode); |
| 57 | 58 |
| 59 void cancelAcquireSharedResource(const WebGLRenderingContext*, long); |
| 60 |
| 58 private: | 61 private: |
| 59 friend class WebGLObject; | 62 friend class WebGLObject; |
| 60 | 63 |
| 61 WebGLContextGroup(); | 64 WebGLContextGroup(); |
| 62 | 65 |
| 63 void detachAndRemoveAllObjects(); | 66 void detachAndRemoveAllObjects(); |
| 64 | 67 |
| 68 long m_acquireRequestCount; |
| 69 |
| 65 HashSet<WebGLRenderingContext*> m_contexts; | 70 HashSet<WebGLRenderingContext*> m_contexts; |
| 66 HashSet<WebGLSharedObject*> m_groupObjects; | 71 HashSet<WebGLSharedObject*> m_groupObjects; |
| 67 }; | 72 }; |
| 68 | 73 |
| 69 } // namespace WebCore | 74 } // namespace WebCore |
| 70 | 75 |
| 71 #endif // WebGLContextGroup_h | 76 #endif // WebGLContextGroup_h |
| OLD | NEW |