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

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

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Display member destruction order Created 4 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
« no previous file with comments | « cc/surfaces/onscreen_display_client.cc ('k') | cc/surfaces/surface_display_output_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ 5 #ifndef CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_
6 #define CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ 6 #define CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "cc/output/output_surface.h" 9 #include "cc/output/output_surface.h"
10 #include "cc/surfaces/surface_factory.h" 10 #include "cc/surfaces/surface_factory.h"
(...skipping 15 matching lines...) Expand all
26 public: 26 public:
27 // The underlying Display and SurfaceManager must outlive this class. 27 // The underlying Display and SurfaceManager must outlive this class.
28 SurfaceDisplayOutputSurface( 28 SurfaceDisplayOutputSurface(
29 SurfaceManager* surface_manager, 29 SurfaceManager* surface_manager,
30 SurfaceIdAllocator* allocator, 30 SurfaceIdAllocator* allocator,
31 scoped_refptr<ContextProvider> context_provider, 31 scoped_refptr<ContextProvider> context_provider,
32 scoped_refptr<ContextProvider> worker_context_provider); 32 scoped_refptr<ContextProvider> worker_context_provider);
33 ~SurfaceDisplayOutputSurface() override; 33 ~SurfaceDisplayOutputSurface() override;
34 34
35 void set_display_client(OnscreenDisplayClient* display_client) { 35 void set_display_client(OnscreenDisplayClient* display_client) {
36 DCHECK(!display_client_);
36 display_client_ = display_client; 37 display_client_ = display_client;
37 } 38 }
38 SurfaceFactory* factory() { return &factory_; } 39 SurfaceFactory* factory() { return &factory_; }
39 void ReceivedVSyncParameters(base::TimeTicks timebase,
40 base::TimeDelta interval);
41 40
42 // OutputSurface implementation. 41 // OutputSurface implementation.
43 void SwapBuffers(CompositorFrame* frame) override; 42 void SwapBuffers(CompositorFrame* frame) override;
44 bool BindToClient(OutputSurfaceClient* client) override; 43 bool BindToClient(OutputSurfaceClient* client) override;
45 void ForceReclaimResources() override; 44 void ForceReclaimResources() override;
46 void DetachFromClient() override; 45 void DetachFromClient() override;
47 46
48 // SurfaceFactoryClient implementation. 47 // SurfaceFactoryClient implementation.
49 void ReturnResources(const ReturnedResourceArray& resources) override; 48 void ReturnResources(const ReturnedResourceArray& resources) override;
50 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override; 49 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override;
51 50
52 private: 51 private:
53 void SwapBuffersComplete(SurfaceDrawStatus drawn); 52 void SwapBuffersComplete(SurfaceDrawStatus drawn);
54 53
55 OnscreenDisplayClient* display_client_; 54 OnscreenDisplayClient* display_client_;
56 SurfaceFactory factory_; 55 SurfaceFactory factory_;
57 gfx::Size display_size_; 56 gfx::Size display_size_;
58 SurfaceId surface_id_; 57 SurfaceId surface_id_;
59 SurfaceIdAllocator* allocator_; 58 SurfaceIdAllocator* allocator_;
60 59
61 DISALLOW_COPY_AND_ASSIGN(SurfaceDisplayOutputSurface); 60 DISALLOW_COPY_AND_ASSIGN(SurfaceDisplayOutputSurface);
62 }; 61 };
63 62
64 } // namespace cc 63 } // namespace cc
65 64
66 #endif // CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ 65 #endif // CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/surfaces/onscreen_display_client.cc ('k') | cc/surfaces/surface_display_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698