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

Side by Side Diff: cc/surfaces/onscreen_display_client.h

Issue 1201573002: cc: Remove BeginFrameSourcesConstructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ 5 #ifndef CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_
6 #define CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ 6 #define CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_
7 7
8 #include "cc/surfaces/display_client.h" 8 #include "cc/surfaces/display_client.h"
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 10 matching lines...) Expand all
21 class ContextProvider; 21 class ContextProvider;
22 class DisplayScheduler; 22 class DisplayScheduler;
23 class SurfaceManager; 23 class SurfaceManager;
24 class SurfaceDisplayOutputSurface; 24 class SurfaceDisplayOutputSurface;
25 25
26 // This class provides a DisplayClient implementation for drawing directly to an 26 // This class provides a DisplayClient implementation for drawing directly to an
27 // onscreen context. 27 // onscreen context.
28 class CC_SURFACES_EXPORT OnscreenDisplayClient 28 class CC_SURFACES_EXPORT OnscreenDisplayClient
29 : NON_EXPORTED_BASE(DisplayClient) { 29 : NON_EXPORTED_BASE(DisplayClient) {
30 public: 30 public:
31 OnscreenDisplayClient( 31 OnscreenDisplayClient(scoped_ptr<OutputSurface> output_surface,
32 scoped_ptr<OutputSurface> output_surface, 32 SurfaceManager* manager,
33 SurfaceManager* manager, 33 SharedBitmapManager* bitmap_manager,
34 SharedBitmapManager* bitmap_manager, 34 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
35 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 35 const RendererSettings& settings,
36 const RendererSettings& settings, 36 base::SingleThreadTaskRunner* task_runner);
37 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
38 ~OnscreenDisplayClient() override; 37 ~OnscreenDisplayClient() override;
39 38
40 bool Initialize(); 39 bool Initialize();
41 Display* display() { return display_.get(); } 40 Display* display() { return display_.get(); }
42 void set_surface_output_surface(SurfaceDisplayOutputSurface* surface) { 41 void set_surface_output_surface(SurfaceDisplayOutputSurface* surface) {
43 surface_display_output_surface_ = surface; 42 surface_display_output_surface_ = surface;
44 } 43 }
45 44
46 // DisplayClient implementation. 45 // DisplayClient implementation.
47 void CommitVSyncParameters(base::TimeTicks timebase, 46 void CommitVSyncParameters(base::TimeTicks timebase,
48 base::TimeDelta interval) override; 47 base::TimeDelta interval) override;
49 void OutputSurfaceLost() override; 48 void OutputSurfaceLost() override;
50 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 49 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
51 50
52 bool output_surface_lost() { return output_surface_lost_; } 51 bool output_surface_lost() { return output_surface_lost_; }
53 52
54 protected: 53 protected:
55 scoped_ptr<OutputSurface> output_surface_; 54 scoped_ptr<OutputSurface> output_surface_;
56 scoped_ptr<Display> display_; 55 scoped_ptr<Display> display_;
57 VSyncParameterObserver* vsync_observer_; 56 scoped_ptr<SyntheticBeginFrameSource> synthetic_frame_source_;
58 scoped_ptr<BeginFrameSource> begin_frame_source_; 57 scoped_ptr<BackToBackBeginFrameSource> unthrottled_frame_source_;
59 scoped_ptr<DisplayScheduler> scheduler_; 58 scoped_ptr<DisplayScheduler> scheduler_;
60 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 59 base::SingleThreadTaskRunner* task_runner_;
61 SurfaceDisplayOutputSurface* surface_display_output_surface_; 60 SurfaceDisplayOutputSurface* surface_display_output_surface_;
62 bool output_surface_lost_; 61 bool output_surface_lost_;
63 bool disable_gpu_vsync_; 62 bool disable_gpu_vsync_;
64 63
65 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient); 64 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient);
66 }; 65 };
67 66
68 } // namespace cc 67 } // namespace cc
69 68
70 #endif // CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ 69 #endif // CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698