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

Side by Side Diff: services/gfx/compositor/backend/gpu_output.cc

Issue 1677753002: Mojo C++ bindings: InterfacePtr::PassInterface -> PassInterfaceHandle (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « services/dart/content_handler_app_service_connector.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/gfx/compositor/backend/gpu_output.h" 5 #include "services/gfx/compositor/backend/gpu_output.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 26 matching lines...) Expand all
37 options.message_pump_factory = base::Bind(&CreateMessagePumpMojo); 37 options.message_pump_factory = base::Bind(&CreateMessagePumpMojo);
38 38
39 rasterizer_thread_.reset(new base::Thread("gpu_rasterizer")); 39 rasterizer_thread_.reset(new base::Thread("gpu_rasterizer"));
40 rasterizer_thread_->StartWithOptions(options); 40 rasterizer_thread_->StartWithOptions(options);
41 rasterizer_task_runner_ = rasterizer_thread_->message_loop()->task_runner(); 41 rasterizer_task_runner_ = rasterizer_thread_->message_loop()->task_runner();
42 42
43 rasterizer_task_runner_->PostTask( 43 rasterizer_task_runner_->PostTask(
44 FROM_HERE, 44 FROM_HERE,
45 base::Bind(&RasterizerDelegate::CreateRasterizer, 45 base::Bind(&RasterizerDelegate::CreateRasterizer,
46 base::Unretained(rasterizer_delegate_.get()), 46 base::Unretained(rasterizer_delegate_.get()),
47 base::Passed(context_provider.PassInterface()), scheduler_, 47 base::Passed(context_provider.PassInterfaceHandle()),
48 base::MessageLoop::current()->task_runner(), error_callback)); 48 scheduler_, base::MessageLoop::current()->task_runner(),
49 error_callback));
49 } 50 }
50 51
51 GpuOutput::~GpuOutput() { 52 GpuOutput::~GpuOutput() {
52 // Ensure destruction happens on the correct thread. 53 // Ensure destruction happens on the correct thread.
53 rasterizer_task_runner_->PostTask( 54 rasterizer_task_runner_->PostTask(
54 FROM_HERE, base::Bind(&Drop<RasterizerDelegate>, 55 FROM_HERE, base::Bind(&Drop<RasterizerDelegate>,
55 base::Passed(&rasterizer_delegate_))); 56 base::Passed(&rasterizer_delegate_)));
56 } 57 }
57 58
58 Scheduler* GpuOutput::GetScheduler() { 59 Scheduler* GpuOutput::GetScheduler() {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 scheduler, task_runner, error_callback)); 103 scheduler, task_runner, error_callback));
103 } 104 }
104 105
105 void GpuOutput::RasterizerDelegate::SubmitNextFrame() { 106 void GpuOutput::RasterizerDelegate::SubmitNextFrame() {
106 std::shared_ptr<RenderFrame> frame(frame_queue_->TakeFrame()); 107 std::shared_ptr<RenderFrame> frame(frame_queue_->TakeFrame());
107 DCHECK(frame); 108 DCHECK(frame);
108 rasterizer_->SubmitFrame(frame); 109 rasterizer_->SubmitFrame(frame);
109 } 110 }
110 111
111 } // namespace compositor 112 } // namespace compositor
OLDNEW
« no previous file with comments | « services/dart/content_handler_app_service_connector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698