| 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/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 282 } |
| 283 | 283 |
| 284 void IOSurfaceImageTransportSurface::OnResizeViewACK() { | 284 void IOSurfaceImageTransportSurface::OnResizeViewACK() { |
| 285 NOTREACHED(); | 285 NOTREACHED(); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void IOSurfaceImageTransportSurface::OnResize(gfx::Size size) { | 288 void IOSurfaceImageTransportSurface::OnResize(gfx::Size size) { |
| 289 // This trace event is used in gpu_feature_browsertest.cc - the test will need | 289 // This trace event is used in gpu_feature_browsertest.cc - the test will need |
| 290 // to be updated if this event is changed or moved. | 290 // to be updated if this event is changed or moved. |
| 291 TRACE_EVENT2("gpu", "IOSurfaceImageTransportSurface::OnResize", | 291 TRACE_EVENT2("gpu", "IOSurfaceImageTransportSurface::OnResize", |
| 292 "width", size.width(), "height", size.height()); | 292 "old_width", size_.width(), "new_width", size.width()); |
| 293 // Caching |context_| from OnMakeCurrent. It should still be current. | 293 // Caching |context_| from OnMakeCurrent. It should still be current. |
| 294 DCHECK(context_->IsCurrent(this)); | 294 DCHECK(context_->IsCurrent(this)); |
| 295 | 295 |
| 296 size_ = size; | 296 size_ = size; |
| 297 | 297 |
| 298 CreateIOSurface(); | 298 CreateIOSurface(); |
| 299 } | 299 } |
| 300 | 300 |
| 301 void IOSurfaceImageTransportSurface::UnrefIOSurface() { | 301 void IOSurfaceImageTransportSurface::UnrefIOSurface() { |
| 302 DCHECK(context_->IsCurrent(this)); | 302 DCHECK(context_->IsCurrent(this)); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 NOTREACHED(); | 432 NOTREACHED(); |
| 433 return NULL; | 433 return NULL; |
| 434 } | 434 } |
| 435 if (surface->Initialize()) | 435 if (surface->Initialize()) |
| 436 return surface; | 436 return surface; |
| 437 else | 437 else |
| 438 return NULL; | 438 return NULL; |
| 439 } | 439 } |
| 440 | 440 |
| 441 #endif // defined(USE_GPU) | 441 #endif // defined(USE_GPU) |
| OLD | NEW |