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

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

Issue 24096029: Moved the majority of WebGL functionality into WebGLRenderingContextBase (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef WebGLContextObject_h 26 #ifndef WebGLContextObject_h
27 #define WebGLContextObject_h 27 #define WebGLContextObject_h
28 28
29 #include "core/html/canvas/WebGLObject.h" 29 #include "core/html/canvas/WebGLObject.h"
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 class GraphicsContext3D; 33 class GraphicsContext3D;
34 class WebGLRenderingContext; 34 class WebGLRenderingContextBase;
35 35
36 // WebGLContextObject the base class for objects that are owned by a specific 36 // WebGLContextObject the base class for objects that are owned by a specific
37 // WebGLRenderingContext. 37 // WebGLRenderingContextBase.
38 class WebGLContextObject : public WebGLObject { 38 class WebGLContextObject : public WebGLObject {
39 public: 39 public:
40 virtual ~WebGLContextObject(); 40 virtual ~WebGLContextObject();
41 41
42 WebGLRenderingContext* context() const { return m_context; } 42 WebGLRenderingContextBase* context() const { return m_context; }
43 43
44 virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContext* context) const 44 virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContextB ase* context) const
45 { 45 {
46 return context == m_context; 46 return context == m_context;
47 } 47 }
48 48
49 void detachContext(); 49 void detachContext();
50 50
51 protected: 51 protected:
52 WebGLContextObject(WebGLRenderingContext*); 52 WebGLContextObject(WebGLRenderingContextBase*);
53 53
54 virtual bool hasGroupOrContext() const 54 virtual bool hasGroupOrContext() const
55 { 55 {
56 return m_context; 56 return m_context;
57 } 57 }
58 58
59 virtual GraphicsContext3D* getAGraphicsContext3D() const; 59 virtual GraphicsContext3D* getAGraphicsContext3D() const;
60 60
61 private: 61 private:
62 WebGLRenderingContext* m_context; 62 WebGLRenderingContextBase* m_context;
63 }; 63 };
64 64
65 } // namespace WebCore 65 } // namespace WebCore
66 66
67 #endif // WebGLContextObject_h 67 #endif // WebGLContextObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698