| 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 "content/common/gpu/gpu_channel.h" | 7 #include "content/common/gpu/gpu_channel.h" |
| 8 #include "content/common/gpu/gpu_channel_manager.h" | 8 #include "content/common/gpu/gpu_channel_manager.h" |
| 9 #include "content/common/gpu/gpu_messages.h" | 9 #include "content/common/gpu/gpu_messages.h" |
| 10 #include "gpu/command_buffer/service/context_group.h" | 10 #include "gpu/command_buffer/service/context_group.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 116 } |
| 117 | 117 |
| 118 helper_->Destroy(); | 118 helper_->Destroy(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 bool TextureImageTransportSurface::Resize(const gfx::Size&) { | 121 bool TextureImageTransportSurface::Resize(const gfx::Size&) { |
| 122 return true; | 122 return true; |
| 123 } | 123 } |
| 124 | 124 |
| 125 bool TextureImageTransportSurface::IsOffscreen() { | 125 bool TextureImageTransportSurface::IsOffscreen() { |
| 126 return false; | 126 return parent_stub_ ? parent_stub_->surface()->IsOffscreen() : true; |
| 127 } | 127 } |
| 128 | 128 |
| 129 bool TextureImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) { | 129 bool TextureImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) { |
| 130 if (stub_destroyed_) { | 130 if (stub_destroyed_) { |
| 131 // Early-exit so that we don't recreate the fbo. We still want to return | 131 // Early-exit so that we don't recreate the fbo. We still want to return |
| 132 // true, so that the context is made current and the GLES2DecoderImpl can | 132 // true, so that the context is made current and the GLES2DecoderImpl can |
| 133 // release its own resources. | 133 // release its own resources. |
| 134 return true; | 134 return true; |
| 135 } | 135 } |
| 136 | 136 |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 Texture& texture = textures_[i]; | 431 Texture& texture = textures_[i]; |
| 432 texture.info = NULL; | 432 texture.info = NULL; |
| 433 if (!texture.sent_to_client) | 433 if (!texture.sent_to_client) |
| 434 continue; | 434 continue; |
| 435 GpuHostMsg_AcceleratedSurfaceRelease_Params params; | 435 GpuHostMsg_AcceleratedSurfaceRelease_Params params; |
| 436 params.identifier = texture.client_id; | 436 params.identifier = texture.client_id; |
| 437 helper_->SendAcceleratedSurfaceRelease(params); | 437 helper_->SendAcceleratedSurfaceRelease(params); |
| 438 } | 438 } |
| 439 parent_stub_ = NULL; | 439 parent_stub_ = NULL; |
| 440 } | 440 } |
| OLD | NEW |