2010-05-28 00:04:26 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2010-05-13 04:56:11 +04:00
|
|
|
|
|
|
|
#ifndef GFX_COLORLAYEROGL_H
|
|
|
|
#define GFX_COLORLAYEROGL_H
|
|
|
|
|
2011-04-03 06:14:00 +04:00
|
|
|
#include "mozilla/layers/PLayers.h"
|
|
|
|
#include "mozilla/layers/ShadowLayers.h"
|
2010-10-14 02:55:45 +04:00
|
|
|
|
2010-05-13 04:56:11 +04:00
|
|
|
#include "LayerManagerOGL.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
|
|
|
class THEBES_API ColorLayerOGL : public ColorLayer,
|
|
|
|
public LayerOGL
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ColorLayerOGL(LayerManagerOGL *aManager)
|
|
|
|
: ColorLayer(aManager, NULL)
|
|
|
|
, LayerOGL(aManager)
|
|
|
|
{
|
|
|
|
mImplData = static_cast<LayerOGL*>(this);
|
|
|
|
}
|
2010-08-07 09:09:18 +04:00
|
|
|
~ColorLayerOGL() { Destroy(); }
|
2010-05-13 04:56:11 +04:00
|
|
|
|
|
|
|
// LayerOGL Implementation
|
2010-10-14 02:55:45 +04:00
|
|
|
virtual Layer* GetLayer() { return this; }
|
|
|
|
|
2011-10-17 18:59:28 +04:00
|
|
|
virtual void Destroy() { mDestroyed = true; }
|
2010-10-14 02:55:45 +04:00
|
|
|
|
|
|
|
virtual void RenderLayer(int aPreviousFrameBuffer,
|
|
|
|
const nsIntPoint& aOffset);
|
2012-01-16 09:41:55 +04:00
|
|
|
virtual void CleanupResources() {};
|
2010-10-14 02:55:45 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class ShadowColorLayerOGL : public ShadowColorLayer,
|
|
|
|
public LayerOGL
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ShadowColorLayerOGL(LayerManagerOGL *aManager)
|
|
|
|
: ShadowColorLayer(aManager, NULL)
|
|
|
|
, LayerOGL(aManager)
|
|
|
|
{
|
|
|
|
mImplData = static_cast<LayerOGL*>(this);
|
|
|
|
}
|
|
|
|
~ShadowColorLayerOGL() { Destroy(); }
|
|
|
|
|
|
|
|
// LayerOGL Implementation
|
|
|
|
virtual Layer* GetLayer() { return this; }
|
2010-05-13 04:56:11 +04:00
|
|
|
|
2011-10-17 18:59:28 +04:00
|
|
|
virtual void Destroy() { mDestroyed = true; }
|
2010-08-07 09:09:18 +04:00
|
|
|
|
2010-05-25 10:35:35 +04:00
|
|
|
virtual void RenderLayer(int aPreviousFrameBuffer,
|
|
|
|
const nsIntPoint& aOffset);
|
2012-01-16 09:41:55 +04:00
|
|
|
virtual void CleanupResources() {};
|
2010-05-13 04:56:11 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* layers */
|
|
|
|
} /* mozilla */
|
|
|
|
#endif /* GFX_COLORLAYEROGL_H */
|