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

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

Issue 1711533002: Decouple browser-specific GPU IPC messages from GPU service IPCs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed another Windows Build issue 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 "ui/gfx/native_widget_types.h"
9
10 namespace content {
11
12 struct AcceleratedSurfaceBuffersSwappedParams;
13 struct GPUMemoryUmaStats;
14
15 class GpuChannelManagerDelegate {
16 public:
17 // Tells the delegate that a context has subscribed to a new target and
18 // the browser should start sending the corresponding information
19 virtual void AddSubscription(int32_t client_id, unsigned int target) = 0;
20
21 // Response from GPU to an EstablishChannel request.
22 virtual void ChannelEstablished(const IPC::ChannelHandle& channel_handle) = 0;
23
24 // Tells the delegate that an offscreen context was created for the provided
25 // |active_url|.
26 virtual void DidCreateOffscreenContext(const GURL& active_url) = 0;
27
28 // Notification from GPU that the channel is destroyed.
29 virtual void DidDestroyChannel(int client_id) = 0;
30
31 // Tells the delegate that an offscreen context was destroyed for the provided
32 // |active_url|.
33 virtual void DidDestroyOffscreenContext(const GURL& active_url) = 0;
34
35 // Tells the delegate that a context was lost.
36 virtual void DidLoseContext(bool offscreen,
37 gpu::error::ContextLostReason reason,
38 const GURL& active_url) = 0;
39
40 // Tells the delegate about GPU memory usage statistics for UMA logging.
41 virtual void GpuMemoryUmaStats(const GPUMemoryUmaStats& params) = 0;
42
43 // Tells the delegate that no contexts are subscribed to the target anymore
44 // so the delegate should stop sending the corresponding information.
45 virtual void RemoveSubscription(int32_t client_id, unsigned int target) = 0;
46
47 // Tells the delegate to cache the given shader information in persistent
48 // storage. The embedder is expected tor epopulate the in-memory cache through
no sievers 2016/02/22 21:57:42 nit: typo 'tor epopulate'
Fady Samuel 2016/02/23 04:45:27 Done.
49 // the respective GpuChannelManager API.
50 virtual void StoreShaderToDisk(int32_t client_id,
51 const std::string& key,
52 const std::string& shader) = 0;
53
54 #if defined(OS_MACOSX)
55 // Tells the delegate that an accelerated surface has swapped.
56 virtual void SendAcceleratedSurfaceBuffersSwapped(
57 const AcceleratedSurfaceBuffersSwappedParams& params) = 0;
58 #endif
59
60 #if defined(OS_WIN)
61 virtual void SendAcceleratedSurfaceCreatedChildWindow(
62 const gfx::PluginWindowHandle& parent_window,
63 const gfx::PluginWindowHandle& child_window) = 0;
64 #endif
65
66 protected:
67 virtual ~GpuChannelManagerDelegate() {}
68 };
69
70 } // namespace content
71
72 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698