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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 10052018: Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer dro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating a few comments. Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 switches::kEnableThreadedCompositing); 1907 switches::kEnableThreadedCompositing);
1908 bool has_disable = CommandLine::ForCurrentProcess()->HasSwitch( 1908 bool has_disable = CommandLine::ForCurrentProcess()->HasSwitch(
1909 switches::kDisableThreadedCompositing); 1909 switches::kDisableThreadedCompositing);
1910 DCHECK(!is_thread_trial || !has_disable); 1910 DCHECK(!is_thread_trial || !has_disable);
1911 bool enable_threaded_compositing = 1911 bool enable_threaded_compositing =
1912 is_thread_trial || (has_enable && !has_disable); 1912 is_thread_trial || (has_enable && !has_disable);
1913 if (!enable_threaded_compositing) 1913 if (!enable_threaded_compositing)
1914 Send(new ViewMsg_SwapBuffers_ACK(routing_id_)); 1914 Send(new ViewMsg_SwapBuffers_ACK(routing_id_));
1915 } 1915 }
1916 1916
1917 #if defined(USE_AURA)
1918 // static
1919 void RenderWidgetHostImpl::SendFrontSurfaceIsProtected(
1920 bool is_protected,
1921 uint32 protection_state_id,
1922 int32 route_id,
1923 int gpu_host_id) {
1924 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id);
1925 if (ui_shim) {
1926 ui_shim->Send(new AcceleratedSurfaceMsg_SetFrontSurfaceIsProtected(
1927 route_id, is_protected, protection_state_id));
1928 }
1929 }
1930 #endif
1931
1917 void RenderWidgetHostImpl::DelayedAutoResized() { 1932 void RenderWidgetHostImpl::DelayedAutoResized() {
1918 gfx::Size new_size = new_auto_size_; 1933 gfx::Size new_size = new_auto_size_;
1919 // Clear the new_auto_size_ since the empty value is used as a flag to 1934 // Clear the new_auto_size_ since the empty value is used as a flag to
1920 // indicate that no callback is in progress (i.e. without this line 1935 // indicate that no callback is in progress (i.e. without this line
1921 // DelayedAutoResized will not get called again). 1936 // DelayedAutoResized will not get called again).
1922 new_auto_size_.SetSize(0, 0); 1937 new_auto_size_.SetSize(0, 0);
1923 if (!should_auto_resize_) 1938 if (!should_auto_resize_)
1924 return; 1939 return;
1925 1940
1926 OnRenderAutoResized(new_size); 1941 OnRenderAutoResized(new_size);
1927 } 1942 }
1928 1943
1929 } // namespace content 1944 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698