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

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

Issue 1348363003: content/gpu: Simplify stub scheduling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu_channel_stream
Patch Set: address comments Created 5 years, 3 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 (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 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool OnMessageReceived(const IPC::Message& msg) override; 103 bool OnMessageReceived(const IPC::Message& msg) override;
104 void OnChannelError() override; 104 void OnChannelError() override;
105 105
106 // IPC::Sender implementation: 106 // IPC::Sender implementation:
107 bool Send(IPC::Message* msg) override; 107 bool Send(IPC::Message* msg) override;
108 108
109 // SubscriptionRefSet::Observer implementation 109 // SubscriptionRefSet::Observer implementation
110 void OnAddSubscription(unsigned int target) override; 110 void OnAddSubscription(unsigned int target) override;
111 void OnRemoveSubscription(unsigned int target) override; 111 void OnRemoveSubscription(unsigned int target) override;
112 112
113 // This is called when a command buffer transitions from the unscheduled
114 // state to the scheduled state, which potentially means the channel
115 // transitions from the unscheduled to the scheduled state. When this occurs
116 // deferred IPC messaged are handled.
117 void OnScheduled();
118
119 // This is called when a command buffer transitions between scheduled and 113 // This is called when a command buffer transitions between scheduled and
120 // descheduled states. When any stub is descheduled, we stop preempting 114 // descheduled states. When any stub is descheduled, we stop preempting
121 // other channels. 115 // other channels.
122 void StubSchedulingChanged(bool scheduled); 116 void OnStubSchedulingChanged(GpuCommandBufferStub* stub, bool scheduled);
123 117
124 CreateCommandBufferResult CreateViewCommandBuffer( 118 CreateCommandBufferResult CreateViewCommandBuffer(
125 const gfx::GLSurfaceHandle& window, 119 const gfx::GLSurfaceHandle& window,
126 int32 surface_id, 120 int32 surface_id,
127 const GPUCreateCommandBufferConfig& init_params, 121 const GPUCreateCommandBufferConfig& init_params,
128 int32 route_id); 122 int32 route_id);
129 123
130 gfx::GLShareGroup* share_group() const { return share_group_.get(); } 124 gfx::GLShareGroup* share_group() const { return share_group_.get(); }
131 125
132 GpuCommandBufferStub* LookupCommandBuffer(int32 route_id); 126 GpuCommandBufferStub* LookupCommandBuffer(int32 route_id);
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 463
470 base::WeakPtr<GpuChannel> gpu_channel_; 464 base::WeakPtr<GpuChannel> gpu_channel_;
471 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 465 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
472 466
473 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); 467 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue);
474 }; 468 };
475 469
476 } // namespace content 470 } // namespace content
477 471
478 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ 472 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/gpu_channel.cc » ('j') | content/common/gpu/gpu_command_buffer_stub.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698