2 Copyright (C) 2012 Samsung Electronics.
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef SharedVideoPlatformSurfaceTizen_h
21 #define SharedVideoPlatformSurfaceTizen_h
23 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
28 #include <wtf/OwnPtr.h>
29 #include <wtf/PassOwnPtr.h>
33 class GraphicsContext;
35 class VideoPlatformSurface;
37 class VideoPlatformSurfaceUpdateListener {
39 virtual void platformSurfaceUpdated() = 0;
42 class SharedVideoPlatformSurfaceTizen {
44 enum CopySurfaceType {
50 static PassOwnPtr<SharedVideoPlatformSurfaceTizen> create(IntSize size);
51 ~SharedVideoPlatformSurfaceTizen();
54 void platformSurfaceUpdated();
55 void setVideoPlatformSurfaceUpdateListener(VideoPlatformSurfaceUpdateListener* listener);
56 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
57 void copySurface(SharedVideoPlatformSurfaceTizen*, CopySurfaceType);
58 int graphicsSurfaceFlags() const;
61 SharedVideoPlatformSurfaceTizen(IntSize size);
63 void registerDamageHandler();
64 void unregisterDamageHandler();
66 Ecore_X_Damage m_damage;
67 Ecore_Event_Handler* m_damageHandler;
68 VideoPlatformSurfaceUpdateListener* m_listener;
69 OwnPtr<VideoPlatformSurface> m_platformSurface;
75 #endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
77 #endif // SharedVideoPlatformSurfaceTizen_h