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 1730023004: Revert of Decouple browser-specific GPU IPC messages from GPU service IPCs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_
7
8 #include "gpu/command_buffer/common/constants.h"
9 #include "ui/gfx/native_widget_types.h"
10
11 class GURL;
12
13 namespace IPC {
14 struct ChannelHandle;
15 }
16
17 namespace content {
18
19 struct AcceleratedSurfaceBuffersSwappedParams;
20 struct GPUMemoryUmaStats;
21
22 class GpuChannelManagerDelegate {
23 public:
24 // Tells the delegate that a context has subscribed to a new target and
25 // the browser should start sending the corresponding information
26 virtual void AddSubscription(int32_t client_id, unsigned int target) = 0;
27
28 // Response from GPU to an EstablishChannel request.
29 virtual void ChannelEstablished(const IPC::ChannelHandle& channel_handle) = 0;
30
31 // Tells the delegate that an offscreen context was created for the provided
32 // |active_url|.
33 virtual void DidCreateOffscreenContext(const GURL& active_url) = 0;
34
35 // Notification from GPU that the channel is destroyed.
36 virtual void DidDestroyChannel(int client_id) = 0;
37
38 // Tells the delegate that an offscreen context was destroyed for the provided
39 // |active_url|.
40 virtual void DidDestroyOffscreenContext(const GURL& active_url) = 0;
41
42 // Tells the delegate that a context was lost.
43 virtual void DidLoseContext(bool offscreen,
44 gpu::error::ContextLostReason reason,
45 const GURL& active_url) = 0;
46
47 // Tells the delegate about GPU memory usage statistics for UMA logging.
48 virtual void GpuMemoryUmaStats(const GPUMemoryUmaStats& params) = 0;
49
50 // Tells the delegate that no contexts are subscribed to the target anymore
51 // so the delegate should stop sending the corresponding information.
52 virtual void RemoveSubscription(int32_t client_id, unsigned int target) = 0;
53
54 // Tells the delegate to cache the given shader information in persistent
55 // storage. The embedder is expected to repopulate the in-memory cache through
56 // the respective GpuChannelManager API.
57 virtual void StoreShaderToDisk(int32_t client_id,
58 const std::string& key,
59 const std::string& shader) = 0;
60
61 #if defined(OS_MACOSX)
62 // Tells the delegate that an accelerated surface has swapped.
63 virtual void SendAcceleratedSurfaceBuffersSwapped(
64 const AcceleratedSurfaceBuffersSwappedParams& params) = 0;
65 #endif
66
67 #if defined(OS_WIN)
68 virtual void SendAcceleratedSurfaceCreatedChildWindow(
69 const gfx::PluginWindowHandle& parent_window,
70 const gfx::PluginWindowHandle& child_window) = 0;
71 #endif
72
73 protected:
74 virtual ~GpuChannelManagerDelegate() {}
75 };
76
77 } // namespace content
78
79 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/common/gpu/gpu_channel_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698