diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /gfx/gl/SkiaGLGlue.h | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/gl/SkiaGLGlue.h')
-rwxr-xr-x | gfx/gl/SkiaGLGlue.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/gfx/gl/SkiaGLGlue.h b/gfx/gl/SkiaGLGlue.h new file mode 100755 index 000000000..4110c0c54 --- /dev/null +++ b/gfx/gl/SkiaGLGlue.h @@ -0,0 +1,64 @@ +/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */ +/* 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/. */ + +#ifndef SKIA_GL_GLUE_H_ +#define SKIA_GL_GLUE_H_ + +#ifdef USE_SKIA_GPU + +#include "skia/include/core/SkRefCnt.h" +#include "mozilla/RefPtr.h" + +struct GrGLInterface; +class GrContext; + +namespace mozilla { +namespace gl { + +class GLContext; + +class SkiaGLGlue : public GenericAtomicRefCounted +{ +public: + MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SkiaGLGlue) + explicit SkiaGLGlue(GLContext* context); + GLContext* GetGLContext() const { return mGLContext.get(); } + GrContext* GetGrContext() const { return mGrContext.get(); } + +protected: + virtual ~SkiaGLGlue(); + +private: + RefPtr<GLContext> mGLContext; + sk_sp<GrGLInterface> mGrGLInterface; + sk_sp<GrContext> mGrContext; +}; + +} // namespace gl +} // namespace mozilla + +#else // USE_SKIA_GPU + +class GrContext; + +namespace mozilla { +namespace gl { + +class GLContext; + +class SkiaGLGlue : public GenericAtomicRefCounted +{ +public: + SkiaGLGlue(GLContext* context); + GLContext* GetGLContext() const { return nullptr; } + GrContext* GetGrContext() const { return nullptr; } +}; + +} // namespace gl +} // namespace mozilla + +#endif // USE_SKIA_GPU + +#endif // SKIA_GL_GLUE_H_ |