Index: chromecast/ui/gfx/surface_directfb.h |
diff --git a/chromecast/ui/gfx/surface_directfb.h b/chromecast/ui/gfx/surface_directfb.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..26b3a2b254285bfd071b22a602d9a5ef360665a3 |
--- /dev/null |
+++ b/chromecast/ui/gfx/surface_directfb.h |
@@ -0,0 +1,58 @@ |
+// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROMECAST_UI_GFX_SURFACE_DIRECTFB_H_ |
+#define CHROMECAST_UI_GFX_SURFACE_DIRECTFB_H_ |
+ |
+#include <directfb.h> |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "chromecast/ui/gfx/surface.h" |
+ |
+namespace gfx { |
+namespace chromecast { |
+ |
+class GfxPlaneDirectFb; |
+ |
+class SurfaceDirectFb : public Surface { |
+ public: |
+ SurfaceDirectFb(GfxPlaneDirectFb* plane, const Size& size, bool primary); |
+ virtual ~SurfaceDirectFb(); |
+ |
+ virtual void Blit(Surface* src_surface, |
+ const Rect& src_rect, |
+ const Point& dst_point) OVERRIDE; |
+ |
+ virtual void Composite(Surface* src_surface, |
+ const Rect& src_rect, |
+ const Point& dst_point) OVERRIDE; |
+ |
+ virtual void CopyBitmap(char* src_bitmap, |
+ const Rect& src_rect, |
+ const Rect& damage_rect, |
+ const Point& dst_point) OVERRIDE; |
+ |
+ virtual void BatchCopyBitmap( |
+ char* src_bitmap, |
+ const Rect& src_rect, |
+ const std::vector<Rect>& damage_rect_vector, |
+ const std::vector<Point>& dst_point_vector) OVERRIDE; |
+ |
+ virtual void Fill(const Rect& rect, int argb) OVERRIDE; |
+ |
+ virtual void Display(const Rect& rect, |
+ const Point& frame_buffer_point) OVERRIDE; |
+ |
+ private: |
+ const bool primary_; |
+ IDirectFBSurface* internal_surface_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SurfaceDirectFb); |
+}; |
+ |
+} // namespace chromecast |
+} // namespace gfx |
+ |
+#endif // CHROMECAST_UI_GFX_SURFACE_DIRECTFB_H_ |