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

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

Issue 1129943006: Implement StreamTexture::BindTexImage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CreateStreamTexture Flow Change. Created 5 years, 5 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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/hash.h" 8 #include "base/hash.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 reply_message, true, capabilities); 625 reply_message, true, capabilities);
626 Send(reply_message); 626 Send(reply_message);
627 627
628 if (handle_.is_null() && !active_url_.is_empty()) { 628 if (handle_.is_null() && !active_url_.is_empty()) {
629 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); 629 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
630 gpu_channel_manager->Send(new GpuHostMsg_DidCreateOffscreenContext( 630 gpu_channel_manager->Send(new GpuHostMsg_DidCreateOffscreenContext(
631 active_url_)); 631 active_url_));
632 } 632 }
633 } 633 }
634 634
635 void GpuCommandBufferStub::OnCreateStreamTexture( 635 void GpuCommandBufferStub::CreateStreamTexture(int32 image_id,
636 uint32 texture_id, int32 stream_id, bool* succeeded) { 636 int32 stream_id,
637 bool* succeeded) {
637 #if defined(OS_ANDROID) 638 #if defined(OS_ANDROID)
638 *succeeded = StreamTexture::Create(this, texture_id, stream_id); 639 *succeeded = StreamTexture::Create(this, image_id, stream_id);
639 #else 640 #else
640 *succeeded = false; 641 *succeeded = false;
641 #endif 642 #endif
642 } 643 }
643 644
645 void GpuCommandBufferStub::OnCreateStreamTexture(uint32 texture_id,
646 int32 stream_id,
647 bool* succeeded) {
648 NOTREACHED();
649 }
650
644 void GpuCommandBufferStub::SetLatencyInfoCallback( 651 void GpuCommandBufferStub::SetLatencyInfoCallback(
645 const LatencyInfoCallback& callback) { 652 const LatencyInfoCallback& callback) {
646 latency_info_callback_ = callback; 653 latency_info_callback_ = callback;
647 } 654 }
648 655
649 int32 GpuCommandBufferStub::GetRequestedAttribute(int attr) const { 656 int32 GpuCommandBufferStub::GetRequestedAttribute(int attr) const {
650 // The command buffer is pairs of enum, value 657 // The command buffer is pairs of enum, value
651 // search for the requested attribute, return the value. 658 // search for the requested attribute, return the value.
652 for (std::vector<int32>::const_iterator it = requested_attribs_.begin(); 659 for (std::vector<int32>::const_iterator it = requested_attribs_.begin();
653 it != requested_attribs_.end(); ++it) { 660 it != requested_attribs_.end(); ++it) {
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 result)); 1140 result));
1134 } 1141 }
1135 1142
1136 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, 1143 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase,
1137 base::TimeDelta interval) { 1144 base::TimeDelta interval) {
1138 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, 1145 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase,
1139 interval)); 1146 interval));
1140 } 1147 }
1141 1148
1142 } // namespace content 1149 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698