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

Side by Side Diff: Source/core/html/canvas/WebGLRenderbuffer.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 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) 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 detachAndDeleteObject(); 52 detachAndDeleteObject();
53 } 53 }
54 54
55 WebGLRenderbuffer::WebGLRenderbuffer(WebGLRenderingContextBase* ctx) 55 WebGLRenderbuffer::WebGLRenderbuffer(WebGLRenderingContextBase* ctx)
56 : WebGLSharedObject(ctx) 56 : WebGLSharedObject(ctx)
57 , m_internalFormat(GL_RGBA4) 57 , m_internalFormat(GL_RGBA4)
58 , m_width(0) 58 , m_width(0)
59 , m_height(0) 59 , m_height(0)
60 , m_hasEverBeenBound(false) 60 , m_hasEverBeenBound(false)
61 { 61 {
62 ScriptWrappable::init(this);
63 setObject(ctx->webContext()->createRenderbuffer()); 62 setObject(ctx->webContext()->createRenderbuffer());
64 } 63 }
65 64
66 void WebGLRenderbuffer::deleteObjectImpl(blink::WebGraphicsContext3D* context3d, Platform3DObject object) 65 void WebGLRenderbuffer::deleteObjectImpl(blink::WebGraphicsContext3D* context3d, Platform3DObject object)
67 { 66 {
68 context3d->deleteRenderbuffer(object); 67 context3d->deleteRenderbuffer(object);
69 deleteEmulatedStencilBuffer(context3d); 68 deleteEmulatedStencilBuffer(context3d);
70 } 69 }
71 70
72 void WebGLRenderbuffer::deleteEmulatedStencilBuffer(blink::WebGraphicsContext3D* context3d) 71 void WebGLRenderbuffer::deleteEmulatedStencilBuffer(blink::WebGraphicsContext3D* context3d)
73 { 72 {
74 if (!m_emulatedStencilBuffer) 73 if (!m_emulatedStencilBuffer)
75 return; 74 return;
76 m_emulatedStencilBuffer->deleteObject(context3d); 75 m_emulatedStencilBuffer->deleteObject(context3d);
77 m_emulatedStencilBuffer.clear(); 76 m_emulatedStencilBuffer.clear();
78 } 77 }
79 78
80 void WebGLRenderbuffer::trace(Visitor* visitor) 79 void WebGLRenderbuffer::trace(Visitor* visitor)
81 { 80 {
82 visitor->trace(m_emulatedStencilBuffer); 81 visitor->trace(m_emulatedStencilBuffer);
83 WebGLSharedObject::trace(visitor); 82 WebGLSharedObject::trace(visitor);
84 } 83 }
85 84
86 } 85 }
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLProgram.cpp ('k') | Source/core/html/canvas/WebGLRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698