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

Side by Side Diff: content/browser/gpu/gpu_process_host_ui_shim.h

Issue 8591006: Reland 110355 - Use shared D3D9 texture to transport the compositor's backing buffer to the brows... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_dll.gypi ('k') | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ 5 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_
6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_
7 #pragma once 7 #pragma once
8 8
9 // This class lives on the UI thread and supports classes like the 9 // This class lives on the UI thread and supports classes like the
10 // BackingStoreProxy, which must live on the UI thread. The IO thread 10 // BackingStoreProxy, which must live on the UI thread. The IO thread
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // IPC::Channel::Sender implementation. 68 // IPC::Channel::Sender implementation.
69 virtual bool Send(IPC::Message* msg); 69 virtual bool Send(IPC::Message* msg);
70 70
71 // IPC::Channel::Listener implementation. 71 // IPC::Channel::Listener implementation.
72 // The GpuProcessHost causes this to be called on the UI thread to 72 // The GpuProcessHost causes this to be called on the UI thread to
73 // dispatch the incoming messages from the GPU process, which are 73 // dispatch the incoming messages from the GPU process, which are
74 // actually received on the IO thread. 74 // actually received on the IO thread.
75 virtual bool OnMessageReceived(const IPC::Message& message); 75 virtual bool OnMessageReceived(const IPC::Message& message);
76 76
77 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
78 // TODO(apatrick): Remove this when mac does not use AcceleratedSurfaces for
79 // when running the GPU thread in the browser process.
80 // This is now also used in TOUCH_UI builds.
81 static void SendToGpuHost(int host_id, IPC::Message* msg); 77 static void SendToGpuHost(int host_id, IPC::Message* msg);
82 #endif
83 78
84 private: 79 private:
85 explicit GpuProcessHostUIShim(int host_id); 80 explicit GpuProcessHostUIShim(int host_id);
86 virtual ~GpuProcessHostUIShim(); 81 virtual ~GpuProcessHostUIShim();
87 82
88 // Message handlers. 83 // Message handlers.
89 bool OnControlMessageReceived(const IPC::Message& message); 84 bool OnControlMessageReceived(const IPC::Message& message);
90 85
91 void OnLogMessage(int level, const std::string& header, 86 void OnLogMessage(int level, const std::string& header,
92 const std::string& message); 87 const std::string& message);
93 #if defined(TOOLKIT_USES_GTK) && !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) || \ 88 #if defined(TOOLKIT_USES_GTK) && !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) || \
94 defined(OS_WIN) 89 defined(OS_WIN)
95 void OnResizeView(int32 renderer_id, 90 void OnResizeView(int32 renderer_id,
96 int32 render_view_id, 91 int32 render_view_id,
97 int32 command_buffer_route_id, 92 int32 route_id,
98 gfx::Size size); 93 gfx::Size size);
99 #endif 94 #endif
100 95
96 void OnAcceleratedSurfaceBuffersSwapped(
97 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params);
98
101 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT) 99 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
102 void OnAcceleratedSurfaceNew( 100 void OnAcceleratedSurfaceNew(
103 const GpuHostMsg_AcceleratedSurfaceNew_Params& params); 101 const GpuHostMsg_AcceleratedSurfaceNew_Params& params);
104 void OnAcceleratedSurfaceBuffersSwapped(
105 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params);
106 #endif 102 #endif
107 103
108 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) 104 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
109 void OnAcceleratedSurfaceRelease( 105 void OnAcceleratedSurfaceRelease(
110 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params); 106 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params);
111 #endif 107 #endif
112 108
113 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. 109 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair.
114 int host_id_; 110 int host_id_;
115 }; 111 };
116 112
117 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ 113 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_
OLDNEW
« no previous file with comments | « chrome/chrome_dll.gypi ('k') | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698