OLD | NEW |
---|---|
1 /* | 1 /* |
Ken Russell (switch to Gerrit)
2013/06/19 03:51:24
Accidental whitespace change.
greggman
2013/06/21 19:54:21
Done.
| |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 |
11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 PassRefPtr<WebGLDebugShaders> WebGLDebugShaders::create(WebGLRenderingContext* c ontext) | 53 PassRefPtr<WebGLDebugShaders> WebGLDebugShaders::create(WebGLRenderingContext* c ontext) |
54 { | 54 { |
55 return adoptRef(new WebGLDebugShaders(context)); | 55 return adoptRef(new WebGLDebugShaders(context)); |
56 } | 56 } |
57 | 57 |
58 String WebGLDebugShaders::getTranslatedShaderSource(WebGLShader* shader, Excepti onCode& ec) | 58 String WebGLDebugShaders::getTranslatedShaderSource(WebGLShader* shader, Excepti onCode& ec) |
59 { | 59 { |
60 UNUSED_PARAM(ec); | 60 UNUSED_PARAM(ec); |
61 if (isLost()) | 61 if (isLost()) |
62 return String(); | 62 return String(); |
63 if (!m_context->validateWebGLObject("getTranslatedShaderSource", shader)) | 63 if (!m_context->validateWebGLSharedObject("getTranslatedShaderSource", shade r, WebGLSharedObject::ReadOnly)) |
64 return ""; | 64 return ""; |
65 return m_context->graphicsContext3D()->getExtensions()->getTranslatedShaderS ourceANGLE(shader->object()); | 65 return m_context->graphicsContext3D()->getExtensions()->getTranslatedShaderS ourceANGLE(shader->object()); |
66 } | 66 } |
67 | 67 |
68 bool WebGLDebugShaders::supported(WebGLRenderingContext* context) | 68 bool WebGLDebugShaders::supported(WebGLRenderingContext* context) |
69 { | 69 { |
70 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); | 70 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); |
71 return extensions->supports("GL_ANGLE_translated_shader_source"); | 71 return extensions->supports("GL_ANGLE_translated_shader_source"); |
72 } | 72 } |
73 | 73 |
74 const char* WebGLDebugShaders::getExtensionName() | 74 const char* WebGLDebugShaders::getExtensionName() |
75 { | 75 { |
76 return "WEBGL_debug_shaders"; | 76 return "WEBGL_debug_shaders"; |
77 } | 77 } |
78 | 78 |
79 } // namespace WebCore | 79 } // namespace WebCore |
OLD | NEW |