| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/image_transport_surface_fbo_mac.h" | 5 #include "content/common/gpu/image_transport_surface_fbo_mac.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "content/common/gpu/gpu_messages.h" | 9 #include "content/common/gpu/gpu_messages.h" |
| 10 #include "content/common/gpu/image_transport_surface_calayer_mac.h" | 10 #include "content/common/gpu/image_transport_surface_calayer_mac.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 276 |
| 277 AllocateOrResizeFramebuffer(pixel_size, scale_factor); | 277 AllocateOrResizeFramebuffer(pixel_size, scale_factor); |
| 278 } | 278 } |
| 279 | 279 |
| 280 void ImageTransportSurfaceFBO::SetLatencyInfo( | 280 void ImageTransportSurfaceFBO::SetLatencyInfo( |
| 281 const std::vector<ui::LatencyInfo>& latency_info) { | 281 const std::vector<ui::LatencyInfo>& latency_info) { |
| 282 for (size_t i = 0; i < latency_info.size(); i++) | 282 for (size_t i = 0; i < latency_info.size(); i++) |
| 283 latency_info_.push_back(latency_info[i]); | 283 latency_info_.push_back(latency_info[i]); |
| 284 } | 284 } |
| 285 | 285 |
| 286 void ImageTransportSurfaceFBO::WakeUpGpu() { | |
| 287 NOTIMPLEMENTED(); | |
| 288 } | |
| 289 | |
| 290 void ImageTransportSurfaceFBO::OnWillDestroyStub() { | 286 void ImageTransportSurfaceFBO::OnWillDestroyStub() { |
| 291 helper_->stub()->RemoveDestructionObserver(this); | 287 helper_->stub()->RemoveDestructionObserver(this); |
| 292 Destroy(); | 288 Destroy(); |
| 293 } | 289 } |
| 294 | 290 |
| 295 void ImageTransportSurfaceFBO::DestroyFramebuffer() { | 291 void ImageTransportSurfaceFBO::DestroyFramebuffer() { |
| 296 // If we have resources to destroy, then make sure that we have a current | 292 // If we have resources to destroy, then make sure that we have a current |
| 297 // context which we can use to delete the resources. | 293 // context which we can use to delete the resources. |
| 298 if (context_ || fbo_id_ || texture_id_ || depth_stencil_renderbuffer_id_) { | 294 if (context_ || fbo_id_ || texture_id_ || depth_stencil_renderbuffer_id_) { |
| 299 DCHECK(gfx::GLContext::GetCurrent() == context_); | 295 DCHECK(gfx::GLContext::GetCurrent() == context_); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 } | 432 } |
| 437 | 433 |
| 438 has_complete_framebuffer_ = true; | 434 has_complete_framebuffer_ = true; |
| 439 storage_provider_->FrameSizeChanged(pixel_size_, scale_factor_); | 435 storage_provider_->FrameSizeChanged(pixel_size_, scale_factor_); |
| 440 | 436 |
| 441 glBindTexture(texture_target, previous_texture_id); | 437 glBindTexture(texture_target, previous_texture_id); |
| 442 // The FBO remains bound for this GL context. | 438 // The FBO remains bound for this GL context. |
| 443 } | 439 } |
| 444 | 440 |
| 445 } // namespace content | 441 } // namespace content |
| OLD | NEW |