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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLShader.cpp

Issue 2547813002: Remove WebGLObject maps from WebGLRenderingContextBase and WebGLContextGroup. (Closed)
Patch Set: Fixed WebGLContextObject::validate. Made WebGLExtension non-finalized. Created 4 years 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 22 matching lines...) Expand all
33 WebGLShader* WebGLShader::create(WebGLRenderingContextBase* ctx, GLenum type) { 33 WebGLShader* WebGLShader::create(WebGLRenderingContextBase* ctx, GLenum type) {
34 return new WebGLShader(ctx, type); 34 return new WebGLShader(ctx, type);
35 } 35 }
36 36
37 WebGLShader::WebGLShader(WebGLRenderingContextBase* ctx, GLenum type) 37 WebGLShader::WebGLShader(WebGLRenderingContextBase* ctx, GLenum type)
38 : WebGLSharedPlatform3DObject(ctx), m_type(type), m_source("") { 38 : WebGLSharedPlatform3DObject(ctx), m_type(type), m_source("") {
39 setObject(ctx->contextGL()->CreateShader(type)); 39 setObject(ctx->contextGL()->CreateShader(type));
40 } 40 }
41 41
42 WebGLShader::~WebGLShader() { 42 WebGLShader::~WebGLShader() {
43 // See the comment in WebGLObject::detachAndDeleteObject(). 43 runDestructor();
44 detachAndDeleteObject();
45 } 44 }
46 45
47 void WebGLShader::deleteObjectImpl(gpu::gles2::GLES2Interface* gl) { 46 void WebGLShader::deleteObjectImpl(gpu::gles2::GLES2Interface* gl) {
48 gl->DeleteShader(m_object); 47 gl->DeleteShader(m_object);
49 m_object = 0; 48 m_object = 0;
50 } 49 }
51 50
52 } // namespace blink 51 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698