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

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

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have Nullable<T>::trace() use TraceIfNeeded<>. Created 6 years, 5 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 27 matching lines...) Expand all
38 38
39 WebGLDrawBuffers::~WebGLDrawBuffers() 39 WebGLDrawBuffers::~WebGLDrawBuffers()
40 { 40 {
41 } 41 }
42 42
43 WebGLExtensionName WebGLDrawBuffers::name() const 43 WebGLExtensionName WebGLDrawBuffers::name() const
44 { 44 {
45 return WebGLDrawBuffersName; 45 return WebGLDrawBuffersName;
46 } 46 }
47 47
48 PassRefPtr<WebGLDrawBuffers> WebGLDrawBuffers::create(WebGLRenderingContextBase* context) 48 PassRefPtrWillBeRawPtr<WebGLDrawBuffers> WebGLDrawBuffers::create(WebGLRendering ContextBase* context)
49 { 49 {
50 return adoptRef(new WebGLDrawBuffers(context)); 50 return adoptRefWillBeNoop(new WebGLDrawBuffers(context));
51 } 51 }
52 52
53 // static 53 // static
54 bool WebGLDrawBuffers::supported(WebGLRenderingContextBase* context) 54 bool WebGLDrawBuffers::supported(WebGLRenderingContextBase* context)
55 { 55 {
56 return (context->extensionsUtil()->supportsExtension("GL_EXT_draw_buffers") 56 return (context->extensionsUtil()->supportsExtension("GL_EXT_draw_buffers")
57 && satisfiesWebGLRequirements(context)); 57 && satisfiesWebGLRequirements(context));
58 } 58 }
59 59
60 const char* WebGLDrawBuffers::extensionName() 60 const char* WebGLDrawBuffers::extensionName()
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 if (supportsDepth) 171 if (supportsDepth)
172 context->deleteTexture(depth); 172 context->deleteTexture(depth);
173 if (supportsDepthStencil) 173 if (supportsDepthStencil)
174 context->deleteTexture(depthStencil); 174 context->deleteTexture(depthStencil);
175 for (size_t i = 0; i < colors.size(); ++i) 175 for (size_t i = 0; i < colors.size(); ++i)
176 context->deleteTexture(colors[i]); 176 context->deleteTexture(colors[i]);
177 return ok; 177 return ok;
178 } 178 }
179 179
180 } // namespace WebCore 180 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698