gfx/layers/composite/X11TextureHost.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef MOZILLA_GFX_X11TEXTUREHOST__H
michael@0 7 #define MOZILLA_GFX_X11TEXTUREHOST__H
michael@0 8
michael@0 9 #include "mozilla/layers/TextureHost.h"
michael@0 10 #include "mozilla/layers/LayersSurfaces.h"
michael@0 11 #include "mozilla/gfx/Types.h"
michael@0 12
michael@0 13 class gfxXlibSurface;
michael@0 14
michael@0 15 namespace mozilla {
michael@0 16 namespace layers {
michael@0 17
michael@0 18 // TextureHost for Xlib-backed TextureSources.
michael@0 19 class X11TextureHost : public TextureHost
michael@0 20 {
michael@0 21 public:
michael@0 22 X11TextureHost(TextureFlags aFlags,
michael@0 23 const SurfaceDescriptorX11& aDescriptor);
michael@0 24
michael@0 25 virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE;
michael@0 26
michael@0 27 virtual bool Lock() MOZ_OVERRIDE;
michael@0 28
michael@0 29 virtual gfx::SurfaceFormat GetFormat() const MOZ_OVERRIDE;
michael@0 30
michael@0 31 virtual gfx::IntSize GetSize() const MOZ_OVERRIDE;
michael@0 32
michael@0 33 virtual NewTextureSource* GetTextureSources() MOZ_OVERRIDE
michael@0 34 {
michael@0 35 return mTextureSource;
michael@0 36 }
michael@0 37
michael@0 38 virtual TemporaryRef<gfx::DataSourceSurface> GetAsSurface() MOZ_OVERRIDE
michael@0 39 {
michael@0 40 return nullptr; // XXX - implement this (for MOZ_DUMP_PAINTING)
michael@0 41 }
michael@0 42
michael@0 43 #ifdef MOZ_LAYERS_HAVE_LOG
michael@0 44 virtual const char* Name() { return "X11TextureHost"; }
michael@0 45 #endif
michael@0 46
michael@0 47 protected:
michael@0 48 Compositor* mCompositor;
michael@0 49 RefPtr<NewTextureSource> mTextureSource;
michael@0 50 RefPtr<gfxXlibSurface> mSurface;
michael@0 51 };
michael@0 52
michael@0 53 } // namespace layers
michael@0 54 } // namespace mozilla
michael@0 55
michael@0 56 #endif // MOZILLA_GFX_X11TEXTUREHOST__H

mercurial