gecko-dev/gfx/webrender_bindings/RenderSharedSurfaceTextureHost.h
Daniel Holbert 73cea96890 Bug 1435297 part 2: (automated patch) Switch a bunch of C++ files in gfx to use our standard emacs/vim mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py.
I ran it as follows:
  python /path/to/modeline.py --fix gfx/

This patch changes all affected files to use the exact C++ mode lines from the
Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

MozReview-Commit-ID: FsPNGjFkIFV

--HG--
extra : rebase_source : 7532d0478d0af75e346102105caf5b89631457aa
2018-02-02 12:07:36 -05:00

44 lines
1.3 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 MOZILLA_GFX_RENDERSHAREDSURFACETEXTUREHOST_H
#define MOZILLA_GFX_RENDERSHAREDSURFACETEXTUREHOST_H
#include "RenderTextureHost.h"
namespace mozilla {
namespace gfx {
class SourceSurfaceSharedDataWrapper;
}
namespace wr {
/**
* This class allows for surfaces managed by SharedSurfacesParent to be inserted
* into the render texture cache by wrapping an existing surface wrapper. These
* surfaces are backed by BGRA/X shared memory buffers.
*/
class RenderSharedSurfaceTextureHost final : public RenderTextureHost
{
public:
explicit RenderSharedSurfaceTextureHost(gfx::SourceSurfaceSharedDataWrapper* aSurface);
wr::WrExternalImage Lock(uint8_t aChannelIndex, gl::GLContext* aGL) override;
void Unlock() override;
private:
~RenderSharedSurfaceTextureHost() override;
RefPtr<gfx::SourceSurfaceSharedDataWrapper> mSurface;
gfx::DataSourceSurface::MappedSurface mMap;
bool mLocked;
};
} // namespace wr
} // namespace mozilla
#endif // MOZILLA_GFX_RENDERSHAREDSURFACETEXTUREHOST_H