1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_GFX_OZONE_SURFACE_OZONE_BASE_H_
6 #define UI_GFX_OZONE_SURFACE_OZONE_BASE_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "skia/ext/refptr.h"
11 #include "ui/gfx/gfx_export.h"
12 #include "ui/gfx/ozone/surface_ozone.h"
16 // Base class for in-tree implementations of SurfaceOzone.
18 // This adds default implementations of all the methods in SurfaceOzone,
19 // for use by in-tree subclasses.
21 // If an out-of-tree implementation inherits this, it is possible there
22 // will be silent breakage instead of a compile time failure as a result
23 // of changes to the interface.
24 class GFX_EXPORT SurfaceOzoneBase
: public SurfaceOzone
{
27 virtual ~SurfaceOzoneBase() OVERRIDE
;
30 virtual bool InitializeEGL() OVERRIDE
;
31 virtual intptr_t /* EGLNativeWindowType */ GetEGLNativeWindow() OVERRIDE
;
32 virtual bool InitializeCanvas() OVERRIDE
;
33 virtual skia::RefPtr
<SkCanvas
> GetCanvas() OVERRIDE
;
34 virtual bool ResizeCanvas(const gfx::Size
& viewport_size
) OVERRIDE
;
35 virtual bool PresentCanvas() OVERRIDE
;
36 virtual scoped_ptr
<gfx::VSyncProvider
> CreateVSyncProvider() OVERRIDE
;
41 #endif // UI_GFX_OZONE_SURFACE_OZONE_BASE_H_