root/ui/ozone/platform/caca/caca_surface_factory.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


// Copyright 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 UI_OZONE_PLATFORM_CACA_CACA_SURFACE_FACTORY_H_
#define UI_OZONE_PLATFORM_CACA_CACA_SURFACE_FACTORY_H_

#include <caca.h>

#include "base/memory/scoped_ptr.h"
#include "ui/gfx/ozone/surface_factory_ozone.h"

namespace ui {

class CacaConnection;

class CacaSurfaceFactory : public gfx::SurfaceFactoryOzone {
 public:
  CacaSurfaceFactory(CacaConnection* connection);
  virtual ~CacaSurfaceFactory();

  // gfx::SurfaceFactoryOzone overrides:
  virtual HardwareState InitializeHardware() OVERRIDE;
  virtual void ShutdownHardware() OVERRIDE;
  virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
  virtual bool LoadEGLGLES2Bindings(
      AddGLLibraryCallback add_gl_library,
      SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
  virtual scoped_ptr<gfx::SurfaceOzone> CreateSurfaceForWidget(
      gfx::AcceleratedWidget widget) OVERRIDE;

 private:
  HardwareState state_;

  CacaConnection* connection_;  // Not owned.

  DISALLOW_COPY_AND_ASSIGN(CacaSurfaceFactory);
};

}  // namespace ui

#endif  // UI_OZONE_PLATFORM_CACA_CACA_SURFACE_FACTORY_H_

/* [<][>][^][v][top][bottom][index][help] */