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

Side by Side Diff: content/renderer/gpu/compositor_forwarding_message_filter.cc

Issue 2835403004: Revert "Use MojoCompositorFrameSink in RendererCompositorFrameSink"
Patch Set: Rebased Created 3 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer/gpu//compositor_forwarding_message_filter.h" 5 #include "content/renderer/gpu//compositor_forwarding_message_filter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 } 43 }
44 NOTREACHED(); 44 NOTREACHED();
45 } 45 }
46 46
47 bool CompositorForwardingMessageFilter::OnMessageReceived( 47 bool CompositorForwardingMessageFilter::OnMessageReceived(
48 const IPC::Message& message) { 48 const IPC::Message& message) {
49 switch (message.type()) { 49 switch (message.type()) {
50 case ViewMsg_SetBeginFramePaused::ID: 50 case ViewMsg_SetBeginFramePaused::ID:
51 case ViewMsg_BeginFrame::ID: 51 case ViewMsg_BeginFrame::ID:
52 case ViewMsg_ReclaimCompositorResources::ID:
52 break; 53 break;
53 default: 54 default:
54 return false; 55 return false;
55 } 56 }
56 57
57 compositor_task_runner_->PostTask( 58 compositor_task_runner_->PostTask(
58 FROM_HERE, 59 FROM_HERE,
59 base::Bind( 60 base::Bind(
60 &CompositorForwardingMessageFilter::ProcessMessageOnCompositorThread, 61 &CompositorForwardingMessageFilter::ProcessMessageOnCompositorThread,
61 this, 62 this,
62 message)); 63 message));
63 return true; 64 return true;
64 } 65 }
65 66
66 void CompositorForwardingMessageFilter::ProcessMessageOnCompositorThread( 67 void CompositorForwardingMessageFilter::ProcessMessageOnCompositorThread(
67 const IPC::Message& message) { 68 const IPC::Message& message) {
68 DCHECK(compositor_thread_checker_.CalledOnValidThread()); 69 DCHECK(compositor_thread_checker_.CalledOnValidThread());
69 auto handlers = multi_handlers_.equal_range(message.routing_id()); 70 auto handlers = multi_handlers_.equal_range(message.routing_id());
70 if (handlers.first == handlers.second) 71 if (handlers.first == handlers.second)
71 return; 72 return;
72 73
73 for (auto it = handlers.first; it != handlers.second; ++it) 74 for (auto it = handlers.first; it != handlers.second; ++it)
74 it->second.Run(message); 75 it->second.Run(message);
75 } 76 }
76 77
77 } // namespace content 78 } // namespace content
OLDNEW
« no previous file with comments | « content/public/app/mojo/content_browser_manifest.json ('k') | content/renderer/gpu/renderer_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698