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

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

Issue 2465093002: cc: Add OutputSurface state snapshots.
Patch Set: rebase Created 3 years, 11 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/macros.h" 8 #include "base/macros.h"
9 #include "base/threading/non_thread_safe.h" 9 #include "base/threading/non_thread_safe.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 21 matching lines...) Expand all
32 using UpdateVSyncParametersCallback = 32 using UpdateVSyncParametersCallback =
33 base::Callback<void(base::TimeTicks timebase, base::TimeDelta interval)>; 33 base::Callback<void(base::TimeTicks timebase, base::TimeDelta interval)>;
34 34
35 ~BrowserCompositorOutputSurface() override; 35 ~BrowserCompositorOutputSurface() override;
36 36
37 // cc::OutputSurface implementation. 37 // cc::OutputSurface implementation.
38 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; 38 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override;
39 bool HasExternalStencilTest() const override; 39 bool HasExternalStencilTest() const override;
40 void ApplyExternalStencil() override; 40 void ApplyExternalStencil() override;
41 41
42 void OnUpdateVSyncParametersFromGpu(
43 const UpdateVSyncParametersCallback& callback,
44 base::TimeTicks timebase,
45 base::TimeDelta interval);
46
42 void SetReflector(ReflectorImpl* reflector); 47 void SetReflector(ReflectorImpl* reflector);
43 48
44 // Called when |reflector_| was updated. 49 // Called when |reflector_| was updated.
45 virtual void OnReflectorChanged(); 50 virtual void OnReflectorChanged();
46 51
47 #if defined(OS_MACOSX) 52 #if defined(OS_MACOSX)
48 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0; 53 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0;
49 #endif 54 #endif
50 55
51 protected: 56 protected:
52 // Constructor used by the accelerated implementation. 57 // Constructor used by the accelerated implementation.
53 BrowserCompositorOutputSurface( 58 BrowserCompositorOutputSurface(
54 scoped_refptr<cc::ContextProvider> context, 59 scoped_refptr<cc::ContextProvider> context,
55 const UpdateVSyncParametersCallback& update_vsync_parameters_callback, 60 const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
56 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 61 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
57 overlay_candidate_validator); 62 overlay_candidate_validator);
58 63
59 // Constructor used by the software implementation. 64 // Constructor used by the software implementation.
60 BrowserCompositorOutputSurface( 65 BrowserCompositorOutputSurface(
61 std::unique_ptr<cc::SoftwareOutputDevice> software_device, 66 std::unique_ptr<cc::SoftwareOutputDevice> software_device,
62 const UpdateVSyncParametersCallback& update_vsync_parameters_callback); 67 const UpdateVSyncParametersCallback& update_vsync_parameters_callback);
63 68
64 // Constructor used by the Vulkan implementation. 69 // Constructor used by the Vulkan implementation.
65 BrowserCompositorOutputSurface( 70 BrowserCompositorOutputSurface(
66 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider, 71 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider,
67 const UpdateVSyncParametersCallback& update_vsync_parameters_callback); 72 const UpdateVSyncParametersCallback& update_vsync_parameters_callback);
68 73
69 const UpdateVSyncParametersCallback update_vsync_parameters_callback_; 74 UpdateVSyncParametersCallback update_vsync_parameters_callback_;
70 ReflectorImpl* reflector_; 75 ReflectorImpl* reflector_;
76 base::TimeTicks last_vsync_timebase_;
71 77
72 private: 78 private:
73 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 79 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
74 overlay_candidate_validator_; 80 overlay_candidate_validator_;
75 81
76 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); 82 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface);
77 }; 83 };
78 84
79 } // namespace content 85 } // namespace content
80 86
81 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 87 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « components/display_compositor/buffer_queue.cc ('k') | content/browser/compositor/browser_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698