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/texture_image_transport_surface.h" | 5 #include "content/common/gpu/texture_image_transport_surface.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 } | 342 } |
343 | 343 |
344 void* TextureImageTransportSurface::GetHandle() { | 344 void* TextureImageTransportSurface::GetHandle() { |
345 return parent_stub_ ? parent_stub_->surface()->GetHandle() : NULL; | 345 return parent_stub_ ? parent_stub_->surface()->GetHandle() : NULL; |
346 } | 346 } |
347 | 347 |
348 unsigned TextureImageTransportSurface::GetFormat() { | 348 unsigned TextureImageTransportSurface::GetFormat() { |
349 return parent_stub_ ? parent_stub_->surface()->GetFormat() : 0; | 349 return parent_stub_ ? parent_stub_->surface()->GetFormat() : 0; |
350 } | 350 } |
351 | 351 |
352 void TextureImageTransportSurface::OnNewSurfaceACK( | |
353 uint64 surface_handle, TransportDIB::Handle /*shm_handle*/) { | |
354 } | |
355 | |
356 void TextureImageTransportSurface::OnBufferPresented(uint32 sync_point) { | 352 void TextureImageTransportSurface::OnBufferPresented(uint32 sync_point) { |
357 if (sync_point == 0) { | 353 if (sync_point == 0) { |
358 BufferPresentedImpl(); | 354 BufferPresentedImpl(); |
359 } else { | 355 } else { |
360 helper_->manager()->sync_point_manager()->AddSyncPointCallback( | 356 helper_->manager()->sync_point_manager()->AddSyncPointCallback( |
361 sync_point, | 357 sync_point, |
362 base::Bind(&TextureImageTransportSurface::BufferPresentedImpl, | 358 base::Bind(&TextureImageTransportSurface::BufferPresentedImpl, |
363 this->AsWeakPtr())); | 359 this->AsWeakPtr())); |
364 } | 360 } |
365 } | 361 } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 Texture& texture = textures_[i]; | 486 Texture& texture = textures_[i]; |
491 texture.info = NULL; | 487 texture.info = NULL; |
492 if (!texture.sent_to_client) | 488 if (!texture.sent_to_client) |
493 continue; | 489 continue; |
494 GpuHostMsg_AcceleratedSurfaceRelease_Params params; | 490 GpuHostMsg_AcceleratedSurfaceRelease_Params params; |
495 params.identifier = texture.client_id; | 491 params.identifier = texture.client_id; |
496 helper_->SendAcceleratedSurfaceRelease(params); | 492 helper_->SendAcceleratedSurfaceRelease(params); |
497 } | 493 } |
498 parent_stub_ = NULL; | 494 parent_stub_ = NULL; |
499 } | 495 } |
OLD | NEW |