Chromium Code Reviews| 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
| 6 | 6 |
| 7 #include "content/common/gpu/image_transport_surface.h" | 7 #include "content/common/gpu/image_transport_surface.h" |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 // On windows, the surface is recreated and, in case the newly allocated | 217 // On windows, the surface is recreated and, in case the newly allocated |
| 218 // surface happens to have the same address, it should be invalidated on the | 218 // surface happens to have the same address, it should be invalidated on the |
| 219 // decoder so that future calls to MakeCurrent do not early out on the | 219 // decoder so that future calls to MakeCurrent do not early out on the |
| 220 // assumption that neither the context or surface have actually changed. | 220 // assumption that neither the context or surface have actually changed. |
| 221 #if defined(OS_WIN) | 221 #if defined(OS_WIN) |
| 222 Decoder()->ReleaseCurrent(); | 222 Decoder()->ReleaseCurrent(); |
| 223 #endif | 223 #endif |
| 224 | 224 |
| 225 surface_->OnResize(size); | 225 surface_->OnResize(size); |
| 226 | 226 |
| 227 #if defined(OS_ANDROID) | |
| 228 manager_->gpu_memory_manager()->ScheduleManage(); | |
|
mmocny
2012/05/03 15:00:12
I suspect its not possible to resize on android an
jonathan.backer
2012/05/04 14:25:28
How does screen rotation work? I suspect that we g
mmocny
2012/05/04 14:37:21
Good point! Actually the size of the chrome (as in
| |
| 229 #endif | |
| 230 | |
| 227 #if defined(OS_WIN) | 231 #if defined(OS_WIN) |
| 228 Decoder()->MakeCurrent(); | 232 Decoder()->MakeCurrent(); |
| 229 SetSwapInterval(); | 233 SetSwapInterval(); |
| 230 #endif | 234 #endif |
| 231 } | 235 } |
| 232 | 236 |
| 233 PassThroughImageTransportSurface::PassThroughImageTransportSurface( | 237 PassThroughImageTransportSurface::PassThroughImageTransportSurface( |
| 234 GpuChannelManager* manager, | 238 GpuChannelManager* manager, |
| 235 GpuCommandBufferStub* stub, | 239 GpuCommandBufferStub* stub, |
| 236 gfx::GLSurface* surface, | 240 gfx::GLSurface* surface, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 helper_->SendResizeView(size); | 333 helper_->SendResizeView(size); |
| 330 helper_->SetScheduled(false); | 334 helper_->SetScheduled(false); |
| 331 } else { | 335 } else { |
| 332 Resize(new_size_); | 336 Resize(new_size_); |
| 333 } | 337 } |
| 334 } | 338 } |
| 335 | 339 |
| 336 PassThroughImageTransportSurface::~PassThroughImageTransportSurface() {} | 340 PassThroughImageTransportSurface::~PassThroughImageTransportSurface() {} |
| 337 | 341 |
| 338 #endif // defined(ENABLE_GPU) | 342 #endif // defined(ENABLE_GPU) |
| OLD | NEW |