content/canvas/src/WebGLActiveInfo.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef WEBGLACTIVEINFO_H_
     7 #define WEBGLACTIVEINFO_H_
     9 #include "WebGLObjectModel.h"
    10 #include "nsString.h"
    11 #include "js/TypeDecls.h"
    13 namespace mozilla {
    15 class WebGLActiveInfo MOZ_FINAL
    16 {
    17 public:
    18     WebGLActiveInfo(GLint size, GLenum type, const nsACString& name) :
    19         mSize(size),
    20         mType(type),
    21         mName(NS_ConvertASCIItoUTF16(name))
    22     {}
    24     // WebIDL attributes
    26     GLint Size() const {
    27         return mSize;
    28     }
    30     GLenum Type() const {
    31         return mType;
    32     }
    34     void GetName(nsString& retval) const {
    35         retval = mName;
    36     }
    38     JSObject* WrapObject(JSContext *cx);
    40    NS_INLINE_DECL_REFCOUNTING(WebGLActiveInfo)
    42 private:
    43     // Private destructor, to discourage deletion outside of Release():
    44     ~WebGLActiveInfo()
    45     {
    46     }
    48     GLint mSize;
    49     GLenum mType;
    50     nsString mName;
    51 };
    53 } // namespace mozilla
    55 #endif

mercurial