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

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

Issue 1800383002: Disable timestamps in WebGL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clarify comment Created 4 years, 9 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) 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 2776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2787 return WebGLAny(scriptState, maxColorAttachments()); 2787 return WebGLAny(scriptState, maxColorAttachments());
2788 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na me, WEBGL_draw_buffers not enabled"); 2788 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na me, WEBGL_draw_buffers not enabled");
2789 return ScriptValue::createNull(scriptState); 2789 return ScriptValue::createNull(scriptState);
2790 case GL_MAX_DRAW_BUFFERS_EXT: 2790 case GL_MAX_DRAW_BUFFERS_EXT:
2791 if (extensionEnabled(WebGLDrawBuffersName) || isWebGL2OrHigher()) 2791 if (extensionEnabled(WebGLDrawBuffersName) || isWebGL2OrHigher())
2792 return WebGLAny(scriptState, maxDrawBuffers()); 2792 return WebGLAny(scriptState, maxDrawBuffers());
2793 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na me, WEBGL_draw_buffers not enabled"); 2793 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na me, WEBGL_draw_buffers not enabled");
2794 return ScriptValue::createNull(scriptState); 2794 return ScriptValue::createNull(scriptState);
2795 case GL_TIMESTAMP_EXT: 2795 case GL_TIMESTAMP_EXT:
2796 if (extensionEnabled(EXTDisjointTimerQueryName)) 2796 if (extensionEnabled(EXTDisjointTimerQueryName))
2797 return getInt64Parameter(scriptState, GL_TIMESTAMP_EXT); 2797 return WebGLAny(scriptState, 0);
2798 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na me, EXT_disjoint_timer_query not enabled"); 2798 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na me, EXT_disjoint_timer_query not enabled");
2799 return ScriptValue::createNull(scriptState); 2799 return ScriptValue::createNull(scriptState);
2800 case GL_GPU_DISJOINT_EXT: 2800 case GL_GPU_DISJOINT_EXT:
2801 if (extensionEnabled(EXTDisjointTimerQueryName)) 2801 if (extensionEnabled(EXTDisjointTimerQueryName))
2802 return getBooleanParameter(scriptState, GL_GPU_DISJOINT_EXT); 2802 return getBooleanParameter(scriptState, GL_GPU_DISJOINT_EXT);
2803 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na me, EXT_disjoint_timer_query not enabled"); 2803 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na me, EXT_disjoint_timer_query not enabled");
2804 return ScriptValue::createNull(scriptState); 2804 return ScriptValue::createNull(scriptState);
2805 2805
2806 default: 2806 default:
2807 if ((extensionEnabled(WebGLDrawBuffersName) || isWebGL2OrHigher()) 2807 if ((extensionEnabled(WebGLDrawBuffersName) || isWebGL2OrHigher())
(...skipping 3525 matching lines...) Expand 10 before | Expand all | Expand 10 after
6333 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); 6333 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1);
6334 } 6334 }
6335 6335
6336 void WebGLRenderingContextBase::restoreUnpackParameters() 6336 void WebGLRenderingContextBase::restoreUnpackParameters()
6337 { 6337 {
6338 if (m_unpackAlignment != 1) 6338 if (m_unpackAlignment != 1)
6339 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 6339 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
6340 } 6340 }
6341 6341
6342 } // namespace blink 6342 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698