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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 | 109 |
110 helper_->Destroy(); | 110 helper_->Destroy(); |
111 } | 111 } |
112 | 112 |
113 bool TextureImageTransportSurface::Resize(const gfx::Size&) { | 113 bool TextureImageTransportSurface::Resize(const gfx::Size&) { |
114 return true; | 114 return true; |
115 } | 115 } |
116 | 116 |
117 bool TextureImageTransportSurface::IsOffscreen() { | 117 bool TextureImageTransportSurface::IsOffscreen() { |
118 return parent_stub_.get() ? parent_stub_->surface()->IsOffscreen() : true; | 118 return false; |
119 } | 119 } |
120 | 120 |
121 bool TextureImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) { | 121 bool TextureImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) { |
122 if (stub_destroyed_) { | 122 if (stub_destroyed_) { |
123 // Early-exit so that we don't recreate the fbo. We still want to return | 123 // Early-exit so that we don't recreate the fbo. We still want to return |
124 // true, so that the context is made current and the GLES2DecoderImpl can | 124 // true, so that the context is made current and the GLES2DecoderImpl can |
125 // release its own resources. | 125 // release its own resources. |
126 return true; | 126 return true; |
127 } | 127 } |
128 | 128 |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 #endif | 411 #endif |
412 } | 412 } |
413 | 413 |
414 TextureInfo* TextureImageTransportSurface::GetParentInfo(uint32 client_id) { | 414 TextureInfo* TextureImageTransportSurface::GetParentInfo(uint32 client_id) { |
415 DCHECK(parent_stub_.get()); | 415 DCHECK(parent_stub_.get()); |
416 TextureManager* texture_manager = | 416 TextureManager* texture_manager = |
417 parent_stub_->decoder()->GetContextGroup()->texture_manager(); | 417 parent_stub_->decoder()->GetContextGroup()->texture_manager(); |
418 TextureInfo* info = texture_manager->GetTextureInfo(client_id); | 418 TextureInfo* info = texture_manager->GetTextureInfo(client_id); |
419 return info; | 419 return info; |
420 } | 420 } |
OLD | NEW |