Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1598)

Side by Side Diff: Source/core/html/canvas/WebGLContextObject.h

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make WebGLObjects keep a blink::WebGraphicsContext3D for finalization. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 WebGLRenderingContextBase* context() const { return m_context; } 45 WebGLRenderingContextBase* context() const { return m_context; }
46 46
47 virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContextB ase* context) const OVERRIDE FINAL 47 virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContextB ase* context) const OVERRIDE FINAL
48 { 48 {
49 return context == m_context; 49 return context == m_context;
50 } 50 }
51 51
52 void detachContext(); 52 void detachContext();
53 53
54 virtual void trace(Visitor*) OVERRIDE;
55
54 protected: 56 protected:
55 WebGLContextObject(WebGLRenderingContextBase*); 57 explicit WebGLContextObject(WebGLRenderingContextBase*);
56 58
57 virtual bool hasGroupOrContext() const OVERRIDE FINAL 59 virtual bool hasGroupOrContext() const OVERRIDE FINAL
58 { 60 {
59 return m_context; 61 return m_context;
60 } 62 }
61 63
64 #if !ENABLE(OILPAN)
62 virtual blink::WebGraphicsContext3D* getAWebGraphicsContext3D() const OVERRI DE FINAL; 65 virtual blink::WebGraphicsContext3D* getAWebGraphicsContext3D() const OVERRI DE FINAL;
66 #endif
63 67
64 private: 68 private:
65 WebGLRenderingContextBase* m_context; 69 RawPtrWillBeMember<WebGLRenderingContextBase> m_context;
66 }; 70 };
67 71
68 } // namespace WebCore 72 } // namespace WebCore
69 73
70 #endif // WebGLContextObject_h 74 #endif // WebGLContextObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698