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

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

Issue 1416493010: Clean up Mac swap acknowledgement code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update latency info Created 5 years, 1 month 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 | « no previous file | content/browser/compositor/gpu_browser_compositor_output_surface.h » ('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 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/threading/non_thread_safe.h" 8 #include "base/threading/non_thread_safe.h"
9 #include "cc/output/output_surface.h" 9 #include "cc/output/output_surface.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "ui/compositor/compositor_vsync_manager.h" 11 #include "ui/compositor/compositor_vsync_manager.h"
12 12
13 namespace cc { 13 namespace cc {
14 class SoftwareOutputDevice; 14 class SoftwareOutputDevice;
15 } 15 }
16 16
17 namespace gfx {
18 enum class SwapResult;
19 }
20
17 namespace content { 21 namespace content {
18 class BrowserCompositorOverlayCandidateValidator; 22 class BrowserCompositorOverlayCandidateValidator;
19 class ContextProviderCommandBuffer; 23 class ContextProviderCommandBuffer;
20 class ReflectorImpl; 24 class ReflectorImpl;
21 class WebGraphicsContext3DCommandBufferImpl; 25 class WebGraphicsContext3DCommandBufferImpl;
22 26
23 class CONTENT_EXPORT BrowserCompositorOutputSurface 27 class CONTENT_EXPORT BrowserCompositorOutputSurface
24 : public cc::OutputSurface, 28 : public cc::OutputSurface,
25 public ui::CompositorVSyncManager::Observer { 29 public ui::CompositorVSyncManager::Observer {
26 public: 30 public:
(...skipping 12 matching lines...) Expand all
39 43
40 void SetReflector(ReflectorImpl* reflector); 44 void SetReflector(ReflectorImpl* reflector);
41 45
42 // Called when |reflector_| was updated. 46 // Called when |reflector_| was updated.
43 virtual void OnReflectorChanged(); 47 virtual void OnReflectorChanged();
44 48
45 // Returns a callback that will be called when all mirroring 49 // Returns a callback that will be called when all mirroring
46 // compositors have started composition. 50 // compositors have started composition.
47 virtual base::Closure CreateCompositionStartedCallback(); 51 virtual base::Closure CreateCompositionStartedCallback();
48 52
53 // Called when a swap completion is sent from the GPU process.
54 virtual void OnGpuSwapBuffersCompleted(
55 const std::vector<ui::LatencyInfo>& latency_info,
56 gfx::SwapResult result) = 0;
57
49 #if defined(OS_MACOSX) 58 #if defined(OS_MACOSX)
50 virtual void OnSurfaceDisplayed() = 0;
51 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0; 59 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0;
52 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const = 0; 60 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const = 0;
53 #endif 61 #endif
54 62
55 protected: 63 protected:
56 // Constructor used by the accelerated implementation. 64 // Constructor used by the accelerated implementation.
57 BrowserCompositorOutputSurface( 65 BrowserCompositorOutputSurface(
58 const scoped_refptr<cc::ContextProvider>& context, 66 const scoped_refptr<cc::ContextProvider>& context,
59 const scoped_refptr<cc::ContextProvider>& worker_context, 67 const scoped_refptr<cc::ContextProvider>& worker_context,
60 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 68 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
(...skipping 16 matching lines...) Expand all
77 85
78 scoped_ptr<BrowserCompositorOverlayCandidateValidator> 86 scoped_ptr<BrowserCompositorOverlayCandidateValidator>
79 overlay_candidate_validator_; 87 overlay_candidate_validator_;
80 88
81 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); 89 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface);
82 }; 90 };
83 91
84 } // namespace content 92 } // namespace content
85 93
86 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 94 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/gpu_browser_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698