Bug 1202427 - Stub DrawRangeElements into DrawElements. - r=daoshengmu draft
authorJeff Gilbert <jgilbert@mozilla.com>
Mon, 19 Dec 2016 20:10:14 -0800
changeset 451333 339ec2f44b982e6b96aa9bd6b50836fab1dfa9ef
parent 451332 f86dd5608395381a964d064ab36789928c547393
child 451418 7d0e9449b6d622c73f4e6e7748df23c9ffde0119
push id39128
push userbmo:jgilbert@mozilla.com
push dateTue, 20 Dec 2016 04:10:40 +0000
reviewersdaoshengmu
bugs1202427
milestone53.0a1
Bug 1202427 - Stub DrawRangeElements into DrawElements. - r=daoshengmu MozReview-Commit-ID: 2rlnPFcvfEd
dom/canvas/WebGL2Context.h
dom/canvas/WebGL2ContextDraw.cpp
dom/canvas/moz.build
--- a/dom/canvas/WebGL2Context.h
+++ b/dom/canvas/WebGL2Context.h
@@ -265,18 +265,22 @@ public:
     // -------------------------------------------------------------------------
     // Writing to the drawing buffer
 
     /* Implemented in WebGLContext
     void VertexAttribDivisor(GLuint index, GLuint divisor);
     void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
     void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
     */
-    void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
 
+    void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count,
+                           GLenum type, WebGLintptr byteOffset)
+    {
+        DrawElements(mode, count, type, byteOffset);
+    }
 
     // ------------------------------------------------------------------------
     // Multiple Render Targets - WebGL2ContextMRTs.cpp
     /* Implemented in WebGLContext
     void DrawBuffers(const dom::Sequence<GLenum>& buffers);
     */
 
 private:
deleted file mode 100644
--- a/dom/canvas/WebGL2ContextDraw.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "WebGL2Context.h"
-
-namespace mozilla {
-
-// -------------------------------------------------------------------------
-// Writing to the drawing buffer
-
-void
-WebGL2Context::DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset)
-{
-    GenerateWarning("drawRangeElements: Not Implemented.");
-}
-
-} // namespace mozilla
--- a/dom/canvas/moz.build
+++ b/dom/canvas/moz.build
@@ -68,17 +68,16 @@ SOURCES += [
 
 # WebGL Sources
 UNIFIED_SOURCES += [
     'TexUnpackBlob.cpp',
     'WebGL1Context.cpp',
     'WebGL1ContextUniforms.cpp',
     'WebGL2Context.cpp',
     'WebGL2ContextBuffers.cpp',
-    'WebGL2ContextDraw.cpp',
     'WebGL2ContextFramebuffers.cpp',
     'WebGL2ContextMRTs.cpp',
     'WebGL2ContextPrograms.cpp',
     'WebGL2ContextQueries.cpp',
     'WebGL2ContextRenderbuffers.cpp',
     'WebGL2ContextSamplers.cpp',
     'WebGL2ContextState.cpp',
     'WebGL2ContextSync.cpp',