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

Side by Side Diff: content/browser/compositor/browser_compositor_output_surface.h

Issue 334593002: Mac ÜC: Enable back-pressure for the browser compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 6 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 CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include "base/id_map.h" 8 #include "base/id_map.h"
9 #include "base/threading/non_thread_safe.h" 9 #include "base/threading/non_thread_safe.h"
10 #include "cc/output/output_surface.h" 10 #include "cc/output/output_surface.h"
(...skipping 11 matching lines...) Expand all
22 22
23 class CONTENT_EXPORT BrowserCompositorOutputSurface 23 class CONTENT_EXPORT BrowserCompositorOutputSurface
24 : public cc::OutputSurface, 24 : public cc::OutputSurface,
25 public ui::CompositorVSyncManager::Observer, 25 public ui::CompositorVSyncManager::Observer,
26 public base::NonThreadSafe { 26 public base::NonThreadSafe {
27 public: 27 public:
28 virtual ~BrowserCompositorOutputSurface(); 28 virtual ~BrowserCompositorOutputSurface();
29 29
30 // cc::OutputSurface implementation. 30 // cc::OutputSurface implementation.
31 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; 31 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE;
32 virtual void OnSwapBuffersComplete() OVERRIDE;
32 33
33 // ui::CompositorOutputSurface::Observer implementation. 34 // ui::CompositorOutputSurface::Observer implementation.
34 virtual void OnUpdateVSyncParameters(base::TimeTicks timebase, 35 virtual void OnUpdateVSyncParameters(base::TimeTicks timebase,
35 base::TimeDelta interval) OVERRIDE; 36 base::TimeDelta interval) OVERRIDE;
36 37
37 void OnUpdateVSyncParametersFromGpu(base::TimeTicks tiembase, 38 void OnUpdateVSyncParametersFromGpu(base::TimeTicks tiembase,
38 base::TimeDelta interval); 39 base::TimeDelta interval);
39 40
40 void SetReflector(ReflectorImpl* reflector); 41 void SetReflector(ReflectorImpl* reflector);
41 42
43 #if defined(OS_MACOSX)
44 void OnSurfaceDisplayed();
45 #endif
46
42 protected: 47 protected:
43 // Constructor used by the accelerated implementation. 48 // Constructor used by the accelerated implementation.
44 BrowserCompositorOutputSurface( 49 BrowserCompositorOutputSurface(
45 const scoped_refptr<ContextProviderCommandBuffer>& context, 50 const scoped_refptr<ContextProviderCommandBuffer>& context,
46 int surface_id, 51 int surface_id,
47 IDMap<BrowserCompositorOutputSurface>* output_surface_map, 52 IDMap<BrowserCompositorOutputSurface>* output_surface_map,
48 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); 53 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager);
49 54
50 // Constructor used by the software implementation. 55 // Constructor used by the software implementation.
51 BrowserCompositorOutputSurface( 56 BrowserCompositorOutputSurface(
(...skipping 10 matching lines...) Expand all
62 67
63 private: 68 private:
64 void Initialize(); 69 void Initialize();
65 70
66 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); 71 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface);
67 }; 72 };
68 73
69 } // namespace content 74 } // namespace content
70 75
71 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 76 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/output/output_surface.h ('k') | content/browser/compositor/browser_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698