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

Side by Side Diff: content/common/gpu/gpu_channel_manager_delegate.h

Issue 1830513003: Move AcceleratedSurfaceBuffersSwappedParams to content/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed piman's comment Created 4 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_ 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_
7 7
8 #include "gpu/command_buffer/common/constants.h" 8 #include "gpu/command_buffer/common/constants.h"
9 #include "gpu/ipc/common/surface_handle.h" 9 #include "gpu/ipc/common/surface_handle.h"
10 10
11 #if defined(OS_MACOSX)
12 #include "ui/base/cocoa/remote_layer_api.h"
13 #include "ui/events/latency_info.h"
14 #include "ui/gfx/mac/io_surface.h"
15 #endif
16
11 class GURL; 17 class GURL;
12 18
13 namespace IPC { 19 namespace IPC {
14 struct ChannelHandle; 20 struct ChannelHandle;
15 } 21 }
16 22
17 namespace gpu { 23 namespace gpu {
18 struct GPUMemoryUmaStats; 24 struct GPUMemoryUmaStats;
19 } 25 }
20 26
21 namespace content { 27 namespace content {
22 28
23 struct AcceleratedSurfaceBuffersSwappedParams;
24
25 class GpuChannelManagerDelegate { 29 class GpuChannelManagerDelegate {
26 public: 30 public:
27 // Sets the currently active URL. Use GURL() to clear the URL.
28 virtual void SetActiveURL(const GURL& url) = 0;
29
30 // Tells the delegate that a context has subscribed to a new target and 31 // Tells the delegate that a context has subscribed to a new target and
31 // the browser should start sending the corresponding information 32 // the browser should start sending the corresponding information
32 virtual void AddSubscription(int32_t client_id, unsigned int target) = 0; 33 virtual void AddSubscription(int32_t client_id, unsigned int target) = 0;
33 34
34 // Tells the delegate that an offscreen context was created for the provided 35 // Tells the delegate that an offscreen context was created for the provided
35 // |active_url|. 36 // |active_url|.
36 virtual void DidCreateOffscreenContext(const GURL& active_url) = 0; 37 virtual void DidCreateOffscreenContext(const GURL& active_url) = 0;
37 38
38 // Notification from GPU that the channel is destroyed. 39 // Notification from GPU that the channel is destroyed.
39 virtual void DidDestroyChannel(int client_id) = 0; 40 virtual void DidDestroyChannel(int client_id) = 0;
(...skipping 17 matching lines...) Expand all
57 // Tells the delegate to cache the given shader information in persistent 58 // Tells the delegate to cache the given shader information in persistent
58 // storage. The embedder is expected to repopulate the in-memory cache through 59 // storage. The embedder is expected to repopulate the in-memory cache through
59 // the respective GpuChannelManager API. 60 // the respective GpuChannelManager API.
60 virtual void StoreShaderToDisk(int32_t client_id, 61 virtual void StoreShaderToDisk(int32_t client_id,
61 const std::string& key, 62 const std::string& key,
62 const std::string& shader) = 0; 63 const std::string& shader) = 0;
63 64
64 #if defined(OS_MACOSX) 65 #if defined(OS_MACOSX)
65 // Tells the delegate that an accelerated surface has swapped. 66 // Tells the delegate that an accelerated surface has swapped.
66 virtual void SendAcceleratedSurfaceBuffersSwapped( 67 virtual void SendAcceleratedSurfaceBuffersSwapped(
67 const AcceleratedSurfaceBuffersSwappedParams& params) = 0; 68 int32_t surface_id,
69 CAContextID ca_context_id,
70 const gfx::ScopedRefCountedIOSurfaceMachPort& io_surface,
71 const gfx::Size& size,
72 float scale_factor,
73 std::vector<ui::LatencyInfo> latency_info) = 0;
68 #endif 74 #endif
69 75
70 #if defined(OS_WIN) 76 #if defined(OS_WIN)
71 virtual void SendAcceleratedSurfaceCreatedChildWindow( 77 virtual void SendAcceleratedSurfaceCreatedChildWindow(
72 gpu::SurfaceHandle parent_window, 78 gpu::SurfaceHandle parent_window,
73 gpu::SurfaceHandle child_window) = 0; 79 gpu::SurfaceHandle child_window) = 0;
74 #endif 80 #endif
75 81
82 // Sets the currently active URL. Use GURL() to clear the URL.
83 virtual void SetActiveURL(const GURL& url) = 0;
84
76 protected: 85 protected:
77 virtual ~GpuChannelManagerDelegate() {} 86 virtual ~GpuChannelManagerDelegate() {}
78 }; 87 };
79 88
80 } // namespace content 89 } // namespace content
81 90
82 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_ 91 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/accelerated_surface_buffers_swapped_params_mac.cc ('k') | content/common/gpu/gpu_channel_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698