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

Side by Side Diff: content/common/gpu/gpu_channel.cc

Issue 1656433002: Sample code: IPC Transport object for GPU Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GpuMemoryBufferService + Transport object. TODO: Eliminate ChildThreadImpl dependency 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 | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_channel_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/gpu/gpu_channel.h" 5 #include "content/common/gpu/gpu_channel.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 io_task_runner_->PostTask( 620 io_task_runner_->PostTask(
621 FROM_HERE, 621 FROM_HERE,
622 base::Bind(&GpuChannelMessageFilter::UpdateStubSchedulingState, 622 base::Bind(&GpuChannelMessageFilter::UpdateStubSchedulingState,
623 filter_, a_stub_is_descheduled)); 623 filter_, a_stub_is_descheduled));
624 } 624 }
625 } 625 }
626 } 626 }
627 627
628 CreateCommandBufferResult GpuChannel::CreateViewCommandBuffer( 628 CreateCommandBufferResult GpuChannel::CreateViewCommandBuffer(
629 const gfx::GLSurfaceHandle& window, 629 const gfx::GLSurfaceHandle& window,
630 const GPUCreateCommandBufferConfig& init_params, 630 const GpuCreateCommandBufferConfig& init_params,
631 int32_t route_id) { 631 int32_t route_id) {
632 TRACE_EVENT1("gpu", "GpuChannel::CreateViewCommandBuffer", "route_id", 632 TRACE_EVENT1("gpu", "GpuChannel::CreateViewCommandBuffer", "route_id",
633 route_id); 633 route_id);
634 634
635 int32_t share_group_id = init_params.share_group_id; 635 int32_t share_group_id = init_params.share_group_id;
636 GpuCommandBufferStub* share_group = stubs_.get(share_group_id); 636 GpuCommandBufferStub* share_group = stubs_.get(share_group_id);
637 637
638 if (!share_group && share_group_id != MSG_ROUTING_NONE) 638 if (!share_group && share_group_id != MSG_ROUTING_NONE)
639 return CREATE_COMMAND_BUFFER_FAILED; 639 return CREATE_COMMAND_BUFFER_FAILED;
640 640
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 const GpuCommandBufferStub* stub = kv.second; 818 const GpuCommandBufferStub* stub = kv.second;
819 if (stub->decoder() && !stub->decoder()->WasContextLost()) 819 if (stub->decoder() && !stub->decoder()->WasContextLost())
820 return stub; 820 return stub;
821 } 821 }
822 return nullptr; 822 return nullptr;
823 } 823 }
824 #endif 824 #endif
825 825
826 void GpuChannel::OnCreateOffscreenCommandBuffer( 826 void GpuChannel::OnCreateOffscreenCommandBuffer(
827 const gfx::Size& size, 827 const gfx::Size& size,
828 const GPUCreateCommandBufferConfig& init_params, 828 const GpuCreateCommandBufferConfig& init_params,
829 int32_t route_id, 829 int32_t route_id,
830 bool* succeeded) { 830 bool* succeeded) {
831 TRACE_EVENT1("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer", "route_id", 831 TRACE_EVENT1("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer", "route_id",
832 route_id); 832 route_id);
833 833
834 int32_t share_group_id = init_params.share_group_id; 834 int32_t share_group_id = init_params.share_group_id;
835 GpuCommandBufferStub* share_group = stubs_.get(share_group_id); 835 GpuCommandBufferStub* share_group = stubs_.get(share_group_id);
836 836
837 if (!share_group && share_group_id != MSG_ROUTING_NONE) { 837 if (!share_group && share_group_id != MSG_ROUTING_NONE) {
838 *succeeded = false; 838 *succeeded = false;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 } 990 }
991 } 991 }
992 } 992 }
993 993
994 void GpuChannel::HandleUpdateValueState( 994 void GpuChannel::HandleUpdateValueState(
995 unsigned int target, const gpu::ValueState& state) { 995 unsigned int target, const gpu::ValueState& state) {
996 pending_valuebuffer_state_->UpdateState(target, state); 996 pending_valuebuffer_state_->UpdateState(target, state);
997 } 997 }
998 998
999 } // namespace content 999 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698