| OLD | NEW |
| 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 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
| 6 #include <windows.h> | 6 #include <windows.h> |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
| 10 | 10 |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 int32 stream_id, const gfx::Size& initial_size, int32* route_id) { | 905 int32 stream_id, const gfx::Size& initial_size, int32* route_id) { |
| 906 // Note that route_id is only used for notifications sent out from here. | 906 // Note that route_id is only used for notifications sent out from here. |
| 907 // StreamTextureManager owns all texture objects and for incoming messages | 907 // StreamTextureManager owns all texture objects and for incoming messages |
| 908 // it finds the correct object based on stream_id. | 908 // it finds the correct object based on stream_id. |
| 909 *route_id = GenerateRouteID(); | 909 *route_id = GenerateRouteID(); |
| 910 stream_texture_manager_->RegisterStreamTextureProxy( | 910 stream_texture_manager_->RegisterStreamTextureProxy( |
| 911 stream_id, initial_size, *route_id); | 911 stream_id, initial_size, *route_id); |
| 912 } | 912 } |
| 913 | 913 |
| 914 void GpuChannel::OnEstablishStreamTexture( | 914 void GpuChannel::OnEstablishStreamTexture( |
| 915 int32 stream_id, SurfaceTexturePeer::SurfaceTextureTarget type, | 915 int32 stream_id, int32 primary_id, int32 secondary_id) { |
| 916 int32 primary_id, int32 secondary_id) { | |
| 917 stream_texture_manager_->EstablishStreamTexture( | 916 stream_texture_manager_->EstablishStreamTexture( |
| 918 stream_id, type, primary_id, secondary_id); | 917 stream_id, primary_id, secondary_id); |
| 919 } | 918 } |
| 920 #endif | 919 #endif |
| 921 | 920 |
| 922 void GpuChannel::OnCollectRenderingStatsForSurface( | 921 void GpuChannel::OnCollectRenderingStatsForSurface( |
| 923 int32 surface_id, GpuRenderingStats* stats) { | 922 int32 surface_id, GpuRenderingStats* stats) { |
| 924 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); | 923 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); |
| 925 !it.IsAtEnd(); it.Advance()) { | 924 !it.IsAtEnd(); it.Advance()) { |
| 926 int texture_upload_count = | 925 int texture_upload_count = |
| 927 it.GetCurrentValue()->decoder()->GetTextureUploadCount(); | 926 it.GetCurrentValue()->decoder()->GetTextureUploadCount(); |
| 928 base::TimeDelta total_texture_upload_time = | 927 base::TimeDelta total_texture_upload_time = |
| (...skipping 17 matching lines...) Expand all Loading... |
| 946 messages_processed_++; | 945 messages_processed_++; |
| 947 if (preempting_flag_.get()) { | 946 if (preempting_flag_.get()) { |
| 948 io_message_loop_->PostTask( | 947 io_message_loop_->PostTask( |
| 949 FROM_HERE, | 948 FROM_HERE, |
| 950 base::Bind(&SyncPointMessageFilter::MessageProcessed, | 949 base::Bind(&SyncPointMessageFilter::MessageProcessed, |
| 951 filter_, messages_processed_)); | 950 filter_, messages_processed_)); |
| 952 } | 951 } |
| 953 } | 952 } |
| 954 | 953 |
| 955 } // namespace content | 954 } // namespace content |
| OLD | NEW |