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 #include "content/common/gpu/image_transport_surface.h" | 5 #include "content/common/gpu/image_transport_surface.h" |
6 | 6 |
7 #include "base/mac/scoped_cftyperef.h" | 7 #include "base/mac/scoped_cftyperef.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/common/gpu/gpu_messages.h" | 9 #include "content/common/gpu/gpu_messages.h" |
10 #include "content/common/gpu/texture_image_transport_surface.h" | 10 #include "content/common/gpu/texture_image_transport_surface.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
263 extensions += "GL_CHROMIUM_front_buffer_cached "; | 263 extensions += "GL_CHROMIUM_front_buffer_cached "; |
264 extensions += "GL_CHROMIUM_post_sub_buffer"; | 264 extensions += "GL_CHROMIUM_post_sub_buffer"; |
265 return extensions; | 265 return extensions; |
266 } | 266 } |
267 | 267 |
268 gfx::Size IOSurfaceImageTransportSurface::GetSize() { | 268 gfx::Size IOSurfaceImageTransportSurface::GetSize() { |
269 return size_; | 269 return size_; |
270 } | 270 } |
271 | 271 |
272 void IOSurfaceImageTransportSurface::OnBufferPresented( | 272 void IOSurfaceImageTransportSurface::OnBufferPresented( |
273 const AcceleratedSurfaceMsg_BufferPresented_Params& /* params */) { | 273 const AcceleratedSurfaceMsg_BufferPresented_Params& params) { |
274 DCHECK(is_swap_buffers_pending_); | 274 DCHECK(is_swap_buffers_pending_); |
275 | |
276 context_->share_group()->SetRenderer(params.renderer); | |
Ken Russell (switch to Gerrit)
2013/03/01 22:00:58
Please rename SetRenderer -> SetRendererID for cla
| |
275 is_swap_buffers_pending_ = false; | 277 is_swap_buffers_pending_ = false; |
276 if (did_unschedule_) { | 278 if (did_unschedule_) { |
277 did_unschedule_ = false; | 279 did_unschedule_ = false; |
278 helper_->SetScheduled(true); | 280 helper_->SetScheduled(true); |
279 } | 281 } |
280 } | 282 } |
281 | 283 |
282 void IOSurfaceImageTransportSurface::OnResizeViewACK() { | 284 void IOSurfaceImageTransportSurface::OnResizeViewACK() { |
283 NOTREACHED(); | 285 NOTREACHED(); |
284 } | 286 } |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
474 else | 476 else |
475 return NULL; | 477 return NULL; |
476 } | 478 } |
477 | 479 |
478 // static | 480 // static |
479 void ImageTransportSurface::SetAllowOSMesaForTesting(bool allow) { | 481 void ImageTransportSurface::SetAllowOSMesaForTesting(bool allow) { |
480 g_allow_os_mesa = allow; | 482 g_allow_os_mesa = allow; |
481 } | 483 } |
482 | 484 |
483 } // namespace content | 485 } // namespace content |
OLD | NEW |