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

Unified Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 10735010: 3D Compositing in <browser>, first draft. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/gpu_process_host_ui_shim.cc
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index b9347ab495bfc89c0d8bf941ff842e527a5896ab..50e5982342e56ec77dab28ea4d039faf2bf3b412 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -207,16 +207,10 @@ bool GpuProcessHostUIShim::OnControlMessageReceived(
#if defined(TOOLKIT_GTK) || defined(OS_WIN)
IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView)
#endif
-
-#if defined(USE_AURA)
IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceNew,
OnAcceleratedSurfaceNew)
-#endif
-
-#if defined(USE_AURA)
IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceRelease,
OnAcceleratedSurfaceRelease)
-#endif
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP()
@@ -258,7 +252,7 @@ void GpuProcessHostUIShim::OnResizeView(int32 surface_id,
RenderWidgetHostViewPort* view =
GetRenderWidgetHostViewFromSurfaceID(surface_id);
- if (!view)
+ if (!view || !view->ResizeNeedsNewSurface())
Fady Samuel 2012/07/06 15:14:44 Why would a resize not require a new surface?
scshunt 2012/07/06 16:39:03 Various platform-specific reasons (note that this
return;
gfx::GLSurfaceHandle surface = view->GetCompositingSurface();
@@ -289,8 +283,6 @@ void GpuProcessHostUIShim::OnResizeView(int32 surface_id,
#endif
-#if defined(USE_AURA)
-
void GpuProcessHostUIShim::OnAcceleratedSurfaceNew(
const GpuHostMsg_AcceleratedSurfaceNew_Params& params) {
ScopedSendOnIOThread delayed_send(
@@ -315,8 +307,6 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceNew(
params.route_id, surface_handle, shm_handle));
}
-#endif
-
static base::TimeDelta GetSwapDelay() {
CommandLine* cmd_line = CommandLine::ForCurrentProcess();
int delay = 0;
@@ -383,8 +373,6 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceSuspend(int32 surface_id) {
view->AcceleratedSurfaceSuspend();
}
-#if defined(USE_AURA)
-
void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease(
const GpuHostMsg_AcceleratedSurfaceRelease_Params& params) {
RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID(
@@ -393,5 +381,3 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease(
return;
view->AcceleratedSurfaceRelease(params.identifier);
}
-
-#endif

Powered by Google App Engine
This is Rietveld 408576698