OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 5 |
6 #include <algorithm> | 6 #include <algorithm> |
7 | 7 |
8 #include "content/renderer/gpu/transport_texture_host.h" | 8 #include "content/renderer/gpu/transport_texture_host.h" |
9 | 9 |
10 // On Mac gl2.h clashes with gpu_messages.h and this problem hasn't been | 10 // On Mac gl2.h clashes with gpu_messages.h and this problem hasn't been |
11 // solved yet so exclude building on Mac. | 11 // solved yet so exclude building on Mac. |
12 #if !defined(OS_MACOSX) | 12 #if !defined(OS_MACOSX) |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "content/common/gpu/gpu_messages.h" | 16 #include "content/common/gpu/gpu_messages.h" |
17 #include "content/renderer/gpu/renderer_gl_context.h" | 17 #include "content/renderer/gpu/renderer_gl_context.h" |
18 #include "content/renderer/gpu/transport_texture_service.h" | 18 #include "content/renderer/gpu/transport_texture_service.h" |
19 #include "gpu/GLES2/gl2.h" | 19 #include <GLES2/gl2.h> |
20 | 20 |
21 TransportTextureHost::TransportTextureHost(MessageLoop* io_message_loop, | 21 TransportTextureHost::TransportTextureHost(MessageLoop* io_message_loop, |
22 MessageLoop* render_message_loop, | 22 MessageLoop* render_message_loop, |
23 TransportTextureService* service, | 23 TransportTextureService* service, |
24 IPC::Message::Sender* sender, | 24 IPC::Message::Sender* sender, |
25 RendererGLContext* context, | 25 RendererGLContext* context, |
26 int32 context_route_id, | 26 int32 context_route_id, |
27 int32 host_id) | 27 int32 host_id) |
28 : io_message_loop_(io_message_loop), | 28 : io_message_loop_(io_message_loop), |
29 render_message_loop_(render_message_loop), | 29 render_message_loop_(render_message_loop), |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // This method will switch thread properly so just call it directly. | 185 // This method will switch thread properly so just call it directly. |
186 ReleaseTexturesInternal(); | 186 ReleaseTexturesInternal(); |
187 } | 187 } |
188 | 188 |
189 void TransportTextureHost::OnTextureUpdated(int texture_id) { | 189 void TransportTextureHost::OnTextureUpdated(int texture_id) { |
190 if (update_callback_.get()) | 190 if (update_callback_.get()) |
191 update_callback_->Run(texture_id); | 191 update_callback_->Run(texture_id); |
192 } | 192 } |
193 | 193 |
194 #endif | 194 #endif |
OLD | NEW |