 Chromium Code Reviews
 Chromium Code Reviews Issue 365653002:
  Oilpan: move 2D Canvas and WebGL objects to the heap.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 365653002:
  Oilpan: move 2D Canvas and WebGL objects to the heap.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 void addContext(WebGLRenderingContextBase*); | 51 void addContext(WebGLRenderingContextBase*); | 
| 52 void removeContext(WebGLRenderingContextBase*); | 52 void removeContext(WebGLRenderingContextBase*); | 
| 53 | 53 | 
| 54 void addObject(WebGLSharedObject*); | 54 void addObject(WebGLSharedObject*); | 
| 55 void removeObject(WebGLSharedObject*); | 55 void removeObject(WebGLSharedObject*); | 
| 56 | 56 | 
| 57 blink::WebGraphicsContext3D* getAWebGraphicsContext3D(); | 57 blink::WebGraphicsContext3D* getAWebGraphicsContext3D(); | 
| 58 | 58 | 
| 59 void loseContextGroup(WebGLRenderingContextBase::LostContextMode); | 59 void loseContextGroup(WebGLRenderingContextBase::LostContextMode); | 
| 60 | 60 | 
| 61 private: | 61 private: | 
| 62 friend class WebGLObject; | 62 friend class WebGLObject; | 
| 63 | 63 | 
| 64 WebGLContextGroup(); | 64 WebGLContextGroup(); | 
| 65 | 65 | 
| 66 void detachAndRemoveAllObjects(); | 66 void detachAndRemoveAllObjects(); | 
| 67 | 67 | 
| 68 // Oilpan: this object is not on the heap, but keeps bare pointers | |
| 
haraken
2014/07/03 04:40:29
FIXME: Oilpan: ?
 
sof
2014/07/03 07:25:48
Prefixed.
 | |
| 69 // to garbage collected objects in the two hash sets below. The | |
| 70 // objects are responsible for managing their registration with | |
| 71 // WebGLContextGroup, and vice versa, the WebGLContextGroup takes | |
| 72 // care of detaching the group objects if the set of | |
| 73 // WebGLRenderingContextBase contexts becomes empty. | |
| 68 HashSet<WebGLRenderingContextBase*> m_contexts; | 74 HashSet<WebGLRenderingContextBase*> m_contexts; | 
| 69 HashSet<WebGLSharedObject*> m_groupObjects; | 75 HashSet<WebGLSharedObject*> m_groupObjects; | 
| 70 }; | 76 }; | 
| 71 | 77 | 
| 72 } // namespace WebCore | 78 } // namespace WebCore | 
| 73 | 79 | 
| 74 #endif // WebGLContextGroup_h | 80 #endif // WebGLContextGroup_h | 
| OLD | NEW |