Line data Source code
1 : /* -*- Mode: C++; tab-width: 20; 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/. */
5 :
6 : #include "WebGLObjectModel.h"
7 :
8 : #include "WebGLContext.h"
9 :
10 : namespace mozilla {
11 :
12 0 : WebGLContextBoundObject::WebGLContextBoundObject(WebGLContext* webgl)
13 : : mContext(webgl)
14 0 : , mContextGeneration(webgl->Generation())
15 : {
16 0 : }
17 :
18 : bool
19 0 : WebGLContextBoundObject::IsCompatibleWithContext(const WebGLContext* other) const
20 : {
21 0 : return (mContext == other &&
22 0 : mContextGeneration == other->Generation());
23 : }
24 :
25 9 : } // namespace mozilla
|