OLD | NEW |
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 Loading... |
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 Loading... |
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 blink | 180 } // namespace blink |
OLD | NEW |