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

Side by Side Diff: Source/modules/webgl/WebGLRenderbuffer.h

Issue 1234883002: [Oilpan] Migrate classes under module/webgl onto oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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) 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 18 matching lines...) Expand all
29 #include "modules/webgl/WebGLSharedPlatform3DObject.h" 29 #include "modules/webgl/WebGLSharedPlatform3DObject.h"
30 #include "wtf/PassRefPtr.h" 30 #include "wtf/PassRefPtr.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class WebGLRenderbuffer final : public WebGLSharedPlatform3DObject { 34 class WebGLRenderbuffer final : public WebGLSharedPlatform3DObject {
35 DEFINE_WRAPPERTYPEINFO(); 35 DEFINE_WRAPPERTYPEINFO();
36 public: 36 public:
37 ~WebGLRenderbuffer() override; 37 ~WebGLRenderbuffer() override;
38 38
39 static PassRefPtrWillBeRawPtr<WebGLRenderbuffer> create(WebGLRenderingContex tBase*); 39 static WebGLRenderbuffer* create(WebGLRenderingContextBase*);
40 40
41 void setInternalFormat(GLenum internalformat) 41 void setInternalFormat(GLenum internalformat)
42 { 42 {
43 m_internalFormat = internalformat; 43 m_internalFormat = internalformat;
44 } 44 }
45 GLenum internalFormat() const { return m_internalFormat; } 45 GLenum internalFormat() const { return m_internalFormat; }
46 46
47 void setSize(GLsizei width, GLsizei height) 47 void setSize(GLsizei width, GLsizei height)
48 { 48 {
49 m_width = width; 49 m_width = width;
50 m_height = height; 50 m_height = height;
51 } 51 }
52 GLsizei width() const { return m_width; } 52 GLsizei width() const { return m_width; }
53 GLsizei height() const { return m_height; } 53 GLsizei height() const { return m_height; }
54 54
55 bool hasEverBeenBound() const { return object() && m_hasEverBeenBound; } 55 bool hasEverBeenBound() const { return object() && m_hasEverBeenBound; }
56 56
57 void setHasEverBeenBound() { m_hasEverBeenBound = true; } 57 void setHasEverBeenBound() { m_hasEverBeenBound = true; }
58 58
59 void setEmulatedStencilBuffer(PassRefPtrWillBeRawPtr<WebGLRenderbuffer> buff er) { m_emulatedStencilBuffer = buffer; } 59 void setEmulatedStencilBuffer(WebGLRenderbuffer* buffer) { m_emulatedStencil Buffer = buffer; }
60 WebGLRenderbuffer* emulatedStencilBuffer() const { return m_emulatedStencilB uffer.get(); } 60 WebGLRenderbuffer* emulatedStencilBuffer() const { return m_emulatedStencilB uffer.get(); }
sof 2015/08/01 18:49:14 redundant get()
peria 2015/08/03 09:00:36 Done.
61 void deleteEmulatedStencilBuffer(WebGraphicsContext3D* context3d); 61 void deleteEmulatedStencilBuffer(WebGraphicsContext3D* context3d);
62 62
63 DECLARE_VIRTUAL_TRACE(); 63 DECLARE_VIRTUAL_TRACE();
64 64
65 protected: 65 protected:
66 explicit WebGLRenderbuffer(WebGLRenderingContextBase*); 66 explicit WebGLRenderbuffer(WebGLRenderingContextBase*);
67 67
68 void deleteObjectImpl(WebGraphicsContext3D*) override; 68 void deleteObjectImpl(WebGraphicsContext3D*) override;
69 69
70 private: 70 private:
71 bool isRenderbuffer() const override { return true; } 71 bool isRenderbuffer() const override { return true; }
72 72
73 GLenum m_internalFormat; 73 GLenum m_internalFormat;
74 GLsizei m_width, m_height; 74 GLsizei m_width, m_height;
75 75
76 bool m_hasEverBeenBound; 76 bool m_hasEverBeenBound;
77 77
78 RefPtrWillBeMember<WebGLRenderbuffer> m_emulatedStencilBuffer; 78 Member<WebGLRenderbuffer> m_emulatedStencilBuffer;
79 }; 79 };
80 80
81 } // namespace blink 81 } // namespace blink
82 82
83 #endif // WebGLRenderbuffer_h 83 #endif // WebGLRenderbuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698