1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef MOZILLA_GFX_MACIOSURFACETEXTURECLIENTOGL_H 1.10 +#define MOZILLA_GFX_MACIOSURFACETEXTURECLIENTOGL_H 1.11 + 1.12 +#include "mozilla/layers/TextureClientOGL.h" 1.13 + 1.14 +class MacIOSurface; 1.15 + 1.16 +namespace mozilla { 1.17 +namespace layers { 1.18 + 1.19 +class MacIOSurfaceTextureClientOGL : public TextureClient 1.20 +{ 1.21 +public: 1.22 + MacIOSurfaceTextureClientOGL(TextureFlags aFlags); 1.23 + 1.24 + virtual ~MacIOSurfaceTextureClientOGL(); 1.25 + 1.26 + void InitWith(MacIOSurface* aSurface); 1.27 + 1.28 + virtual bool Lock(OpenMode aMode) MOZ_OVERRIDE; 1.29 + 1.30 + virtual void Unlock() MOZ_OVERRIDE; 1.31 + 1.32 + virtual bool IsLocked() const MOZ_OVERRIDE; 1.33 + 1.34 + virtual bool IsAllocated() const MOZ_OVERRIDE { return !!mSurface; } 1.35 + 1.36 + virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) MOZ_OVERRIDE; 1.37 + 1.38 + virtual gfx::IntSize GetSize() const; 1.39 + 1.40 + virtual TextureClientData* DropTextureData() MOZ_OVERRIDE; 1.41 + 1.42 + virtual bool HasInternalBuffer() const MOZ_OVERRIDE { return false; } 1.43 + 1.44 +protected: 1.45 + RefPtr<MacIOSurface> mSurface; 1.46 + bool mIsLocked; 1.47 +}; 1.48 + 1.49 +} 1.50 +} 1.51 + 1.52 +#endif // MOZILLA_GFX_MACIOSURFACETEXTURECLIENTOGL_H 1.53 \ No newline at end of file