Bug 1202427 - Stub DrawRangeElements into DrawElements. - r=daoshengmu
authorJeff Gilbert <jgilbert@mozilla.com>
Mon, 19 Dec 2016 20:10:14 -0800
changeset 357450 64eeb4a05bfecd59ae16df50058e669b5e00099a
parent 357449 793d4f83b98e8b68256893d830dd7bf513a47ad2
child 357451 d4e72a2264ebbeed883e5e0b857d61bcecf8af13
push id17
push userfmarier@mozilla.com
push dateFri, 13 Jan 2017 22:14:57 +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',