EGLImageLayerCompositingThreadClient.h [plain text]
#ifndef EGLImageLayerCompositingThreadClient_h
#define EGLImageLayerCompositingThreadClient_h
#if USE(ACCELERATED_COMPOSITING)
#include "LayerCompositingThreadClient.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/ThreadSafeRefCounted.h>
namespace BlackBerry {
namespace Platform {
namespace Graphics {
class GLES2SharedTextureAccessor;
}
}
}
namespace WebCore {
class LayerCompositingThread;
class EGLImageLayerCompositingThreadClient : public ThreadSafeRefCounted<EGLImageLayerCompositingThreadClient>, public LayerCompositingThreadClient {
public:
static PassRefPtr<EGLImageLayerCompositingThreadClient> create()
{
return adoptRef(new EGLImageLayerCompositingThreadClient());
}
virtual ~EGLImageLayerCompositingThreadClient();
virtual void layerCompositingThreadDestroyed(LayerCompositingThread*)
{
deref(); }
virtual void layerVisibilityChanged(LayerCompositingThread*, bool visible) { }
virtual void uploadTexturesIfNeeded(LayerCompositingThread*);
virtual void drawTextures(LayerCompositingThread*, const BlackBerry::Platform::Graphics::GLES2Program&, double scale, const FloatRect& clipRect);
virtual void deleteTextures(LayerCompositingThread*);
virtual void bindContentsTexture(LayerCompositingThread*);
void setTextureAccessor(BlackBerry::Platform::Graphics::GLES2SharedTextureAccessor*);
private:
EGLImageLayerCompositingThreadClient()
: m_textureAccessor(0)
{
ref(); }
BlackBerry::Platform::Graphics::GLES2SharedTextureAccessor* m_textureAccessor;
};
}
#endif // USE(ACCELERATED_COMPOSITING)
#endif // EGLImageLayerCompositingThreadClient_h