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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 12440005: Use gpu::Mailbox in IPCs instead of std::string (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 break; 438 break;
439 default: 439 default:
440 break; 440 break;
441 } 441 }
442 } 442 }
443 443
444 // static 444 // static
445 void BrowserPluginGuest::AcknowledgeBufferPresent( 445 void BrowserPluginGuest::AcknowledgeBufferPresent(
446 int route_id, 446 int route_id,
447 int gpu_host_id, 447 int gpu_host_id,
448 const std::string& mailbox_name, 448 const gpu::Mailbox& mailbox_name,
449 uint32 sync_point) { 449 uint32 sync_point) {
450 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; 450 AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
451 ack_params.mailbox_name = mailbox_name; 451 ack_params.mailbox_name = mailbox_name;
452 ack_params.sync_point = sync_point; 452 ack_params.sync_point = sync_point;
453 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, 453 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
454 gpu_host_id, 454 gpu_host_id,
455 ack_params); 455 ack_params);
456 } 456 }
457 457
458 // static 458 // static
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 } else { 721 } else {
722 // Deny the request. 722 // Deny the request.
723 callback.Run(content::MediaStreamDevices()); 723 callback.Run(content::MediaStreamDevices());
724 } 724 }
725 media_requests_map_.erase(media_request_iter); 725 media_requests_map_.erase(media_request_iter);
726 } 726 }
727 727
728 void BrowserPluginGuest::OnSwapBuffersACK(int instance_id, 728 void BrowserPluginGuest::OnSwapBuffersACK(int instance_id,
729 int route_id, 729 int route_id,
730 int gpu_host_id, 730 int gpu_host_id,
731 const std::string& mailbox_name, 731 const gpu::Mailbox& mailbox_name,
732 uint32 sync_point) { 732 uint32 sync_point) {
733 AcknowledgeBufferPresent(route_id, gpu_host_id, mailbox_name, sync_point); 733 AcknowledgeBufferPresent(route_id, gpu_host_id, mailbox_name, sync_point);
734 734
735 // This is only relevant on MACOSX and WIN when threaded compositing 735 // This is only relevant on MACOSX and WIN when threaded compositing
736 // is not enabled. In threaded mode, above ACK is sufficient. 736 // is not enabled. In threaded mode, above ACK is sufficient.
737 #if defined(OS_MACOSX) || defined(OS_WIN) 737 #if defined(OS_MACOSX) || defined(OS_WIN)
738 RenderWidgetHostImpl* render_widget_host = 738 RenderWidgetHostImpl* render_widget_host =
739 RenderWidgetHostImpl::From(GetWebContents()->GetRenderViewHost()); 739 RenderWidgetHostImpl::From(GetWebContents()->GetRenderViewHost());
740 render_widget_host->AcknowledgeSwapBuffersToRenderer(); 740 render_widget_host->AcknowledgeSwapBuffersToRenderer();
741 #endif // defined(OS_MACOSX) || defined(OS_WIN) 741 #endif // defined(OS_MACOSX) || defined(OS_WIN)
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 relay_params.bitmap_rect = params.bitmap_rect; 925 relay_params.bitmap_rect = params.bitmap_rect;
926 relay_params.scroll_delta = params.scroll_delta; 926 relay_params.scroll_delta = params.scroll_delta;
927 relay_params.scroll_rect = params.scroll_rect; 927 relay_params.scroll_rect = params.scroll_rect;
928 relay_params.copy_rects = params.copy_rects; 928 relay_params.copy_rects = params.copy_rects;
929 929
930 SendMessageToEmbedder( 930 SendMessageToEmbedder(
931 new BrowserPluginMsg_UpdateRect(instance_id(), relay_params)); 931 new BrowserPluginMsg_UpdateRect(instance_id(), relay_params));
932 } 932 }
933 933
934 } // namespace content 934 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698