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

Side by Side Diff: Source/core/html/canvas/WebGLSharedObject.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 14 matching lines...) Expand all
25 25
26 #ifndef WebGLSharedObject_h 26 #ifndef WebGLSharedObject_h
27 #define WebGLSharedObject_h 27 #define WebGLSharedObject_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 WebGLContextGroup; 34 class WebGLContextGroup;
35 class WebGLRenderingContext; 35 class WebGLRenderingContextBase;
36 36
37 // WebGLSharedObject the base class for objects that can be shared by multiple 37 // WebGLSharedObject the base class for objects that can be shared by multiple
38 // WebGLRenderingContexts. 38 // WebGLRenderingContexts.
39 class WebGLSharedObject : public WebGLObject { 39 class WebGLSharedObject : public WebGLObject {
40 public: 40 public:
41 virtual ~WebGLSharedObject(); 41 virtual ~WebGLSharedObject();
42 42
43 WebGLContextGroup* contextGroup() const { return m_contextGroup; } 43 WebGLContextGroup* contextGroup() const { return m_contextGroup; }
44 44
45 virtual bool isBuffer() const { return false; } 45 virtual bool isBuffer() const { return false; }
46 virtual bool isFramebuffer() const { return false; } 46 virtual bool isFramebuffer() const { return false; }
47 virtual bool isProgram() const { return false; } 47 virtual bool isProgram() const { return false; }
48 virtual bool isRenderbuffer() const { return false; } 48 virtual bool isRenderbuffer() const { return false; }
49 virtual bool isShader() const { return false; } 49 virtual bool isShader() const { return false; }
50 virtual bool isTexture() const { return false; } 50 virtual bool isTexture() const { return false; }
51 51
52 virtual bool validate(const WebGLContextGroup* contextGroup, const WebGLRend eringContext*) const 52 virtual bool validate(const WebGLContextGroup* contextGroup, const WebGLRend eringContextBase*) const
53 { 53 {
54 return contextGroup == m_contextGroup; 54 return contextGroup == m_contextGroup;
55 } 55 }
56 56
57 void detachContextGroup(); 57 void detachContextGroup();
58 58
59 protected: 59 protected:
60 WebGLSharedObject(WebGLRenderingContext*); 60 WebGLSharedObject(WebGLRenderingContextBase*);
61 61
62 virtual bool hasGroupOrContext() const 62 virtual bool hasGroupOrContext() const
63 { 63 {
64 return m_contextGroup; 64 return m_contextGroup;
65 } 65 }
66 66
67 virtual GraphicsContext3D* getAGraphicsContext3D() const; 67 virtual GraphicsContext3D* getAGraphicsContext3D() const;
68 68
69 private: 69 private:
70 WebGLContextGroup* m_contextGroup; 70 WebGLContextGroup* m_contextGroup;
71 }; 71 };
72 72
73 } // namespace WebCore 73 } // namespace WebCore
74 74
75 #endif // WebGLSharedObject_h 75 #endif // WebGLSharedObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698