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

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

Issue 17230006: Implement WEBGL_shared_resources Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
« no previous file with comments | « Source/core/html/canvas/WebGLContextObject.h ('k') | Source/core/html/canvas/WebGLExtension.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
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
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLContextObject.h ('k') | Source/core/html/canvas/WebGLExtension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698