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

Side by Side Diff: sky/engine/core/html/canvas/WebGLObject.h

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void onDetached(blink::WebGraphicsContext3D*); 54 void onDetached(blink::WebGraphicsContext3D*);
55 55
56 // This indicates whether the client side issue a delete call already, not 56 // This indicates whether the client side issue a delete call already, not
57 // whether the OpenGL resource is deleted. 57 // whether the OpenGL resource is deleted.
58 // object()==0 indicates the OpenGL resource is deleted. 58 // object()==0 indicates the OpenGL resource is deleted.
59 bool isDeleted() { return m_deleted; } 59 bool isDeleted() { return m_deleted; }
60 60
61 // True if this object belongs to the group or context. 61 // True if this object belongs to the group or context.
62 virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContextB ase*) const = 0; 62 virtual bool validate(const WebGLContextGroup*, const WebGLRenderingContextB ase*) const = 0;
63 63
64 virtual void trace(Visitor*) { }
65
66 protected: 64 protected:
67 explicit WebGLObject(WebGLRenderingContextBase*); 65 explicit WebGLObject(WebGLRenderingContextBase*);
68 66
69 // setObject should be only called once right after creating a WebGLObject. 67 // setObject should be only called once right after creating a WebGLObject.
70 void setObject(Platform3DObject); 68 void setObject(Platform3DObject);
71 69
72 // deleteObjectImpl should be only called once to delete the OpenGL resource . 70 // deleteObjectImpl should be only called once to delete the OpenGL resource .
73 virtual void deleteObjectImpl(blink::WebGraphicsContext3D*, Platform3DObject ) = 0; 71 virtual void deleteObjectImpl(blink::WebGraphicsContext3D*, Platform3DObject ) = 0;
74 72
75 virtual bool hasGroupOrContext() const = 0; 73 virtual bool hasGroupOrContext() const = 0;
76 74
77 void detach(); 75 void detach();
78 void detachAndDeleteObject(); 76 void detachAndDeleteObject();
79 77
80 virtual blink::WebGraphicsContext3D* getAWebGraphicsContext3D() const = 0; 78 virtual blink::WebGraphicsContext3D* getAWebGraphicsContext3D() const = 0;
81 79
82 private: 80 private:
83 Platform3DObject m_object; 81 Platform3DObject m_object;
84 unsigned m_attachmentCount; 82 unsigned m_attachmentCount;
85 bool m_deleted; 83 bool m_deleted;
86 }; 84 };
87 85
88 } // namespace blink 86 } // namespace blink
89 87
90 #endif // WebGLObject_h 88 #endif // WebGLObject_h
OLDNEW
« no previous file with comments | « sky/engine/core/html/canvas/WebGLExtension.cpp ('k') | sky/engine/core/html/canvas/WebGLRenderbuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698