OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 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 CHROME_BROWSER_RENDERER_HOST_GPU_VIEW_HOST_H_ | |
6 #define CHROME_BROWSER_RENDERER_HOST_GPU_VIEW_HOST_H_ | |
7 #pragma once | |
8 | |
9 #include "base/basictypes.h" | |
10 #include "chrome/common/gpu_native_window_handle.h" | |
11 | |
12 class BackingStore; | |
13 class GpuProcessHostUIShim; | |
14 class RenderWidgetHost; | |
15 class VideoLayer; | |
16 | |
17 namespace gfx { | |
18 class Size; | |
19 } | |
20 | |
21 // A proxy for the GPU process' window for rendering pages. | |
22 class GpuViewHost { | |
23 public: | |
24 GpuViewHost(RenderWidgetHost* widget, GpuNativeWindowHandle parent); | |
25 ~GpuViewHost(); | |
26 | |
27 // Creates a new backing store in the GPU process and returns ownership of | |
28 // the new pointer to the caller. | |
29 BackingStore* CreateBackingStore(const gfx::Size& size); | |
30 | |
31 // Creates a new video layer in the GPU process and returns ownership of the | |
32 // new pointer to the caller. | |
33 VideoLayer* CreateVideoLayer(const gfx::Size& size); | |
34 | |
35 // Notification that the RenderWidgetHost has been asked to paint the window. | |
36 // Depending on the backing store, the GPU backing store may have to repaint | |
37 // at this time. On Linux this is needed because the GPU process paints | |
38 // directly into the RWH's X window. | |
39 void OnWindowPainted(); | |
40 | |
41 private: | |
42 RenderWidgetHost* widget_; | |
43 | |
44 GpuProcessHostUIShim* process_shim_; | |
45 int32 routing_id_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(GpuViewHost); | |
48 }; | |
49 | |
50 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_VIEW_HOST_H_ | |
OLD | NEW |