Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: ui/gfx/ozone/impl/file_surface_factory.h

Issue 205433002: ozone: Add OzoneSurface object that is owned by compositor, GLSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_OZONE_IMPL_FILE_SURFACE_FACTORY_H_ 5 #ifndef UI_GFX_OZONE_IMPL_FILE_SURFACE_FACTORY_H_
6 #define UI_GFX_OZONE_IMPL_FILE_SURFACE_FACTORY_H_ 6 #define UI_GFX_OZONE_IMPL_FILE_SURFACE_FACTORY_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
11 #include "ui/gfx/ozone/surface_factory_ozone.h" 11 #include "ui/gfx/ozone/surface_factory_ozone.h"
12 #include "ui/gfx/skia_util.h"
13 12
14 class SkBitmapDevice; 13 class SkBitmapDevice;
15 class SkCanvas; 14 class SkCanvas;
16 15
17 namespace gfx { 16 namespace gfx {
18 17
19 class GFX_EXPORT FileSurfaceFactory : public SurfaceFactoryOzone { 18 class GFX_EXPORT FileSurfaceFactory : public SurfaceFactoryOzone {
20 public: 19 public:
21 explicit FileSurfaceFactory(const base::FilePath& dump_location); 20 explicit FileSurfaceFactory(const base::FilePath& dump_location);
22 virtual ~FileSurfaceFactory(); 21 virtual ~FileSurfaceFactory();
23 22
24 private: 23 private:
25 // SurfaceFactoryOzone: 24 // SurfaceFactoryOzone:
26 virtual HardwareState InitializeHardware() OVERRIDE; 25 virtual HardwareState InitializeHardware() OVERRIDE;
27 virtual void ShutdownHardware() OVERRIDE; 26 virtual void ShutdownHardware() OVERRIDE;
28 virtual AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 27 virtual AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
29 virtual AcceleratedWidget RealizeAcceleratedWidget( 28 virtual scoped_ptr<SurfaceOzone> CreateSurfaceForWidget(
30 AcceleratedWidget widget) OVERRIDE; 29 AcceleratedWidget widget) OVERRIDE;
31 virtual bool LoadEGLGLES2Bindings( 30 virtual bool LoadEGLGLES2Bindings(
32 AddGLLibraryCallback add_gl_library, 31 AddGLLibraryCallback add_gl_library,
33 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; 32 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
34 virtual bool AttemptToResizeAcceleratedWidget(AcceleratedWidget widget,
35 const Rect& bounds) OVERRIDE;
36 virtual bool SchedulePageFlip(AcceleratedWidget widget) OVERRIDE;
37 virtual SkCanvas* GetCanvasForWidget(AcceleratedWidget widget) OVERRIDE;
38 virtual scoped_ptr<VSyncProvider> CreateVSyncProvider(
39 AcceleratedWidget widget) OVERRIDE;
40 33
41 base::FilePath location_; 34 base::FilePath location_;
42 skia::RefPtr<SkBitmapDevice> device_;
43 skia::RefPtr<SkCanvas> canvas_;
44 35
45 DISALLOW_COPY_AND_ASSIGN(FileSurfaceFactory); 36 DISALLOW_COPY_AND_ASSIGN(FileSurfaceFactory);
46 }; 37 };
47 38
48 } // namespace gfx 39 } // namespace gfx
49 40
50 #endif // UI_GFX_OZONE_IMPL_FILE_SURFACE_FACTORY_H_ 41 #endif // UI_GFX_OZONE_IMPL_FILE_SURFACE_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/gfx/ozone/dri/dri_surface_factory_unittest.cc ('k') | ui/gfx/ozone/impl/file_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698