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 "content/common/gpu/gpu_messages.h" | 7 #include "content/common/gpu/gpu_messages.h" |
8 #include "content/common/gpu/image_transport_surface_calayer_mac.h" | 8 #include "content/common/gpu/image_transport_surface_calayer_mac.h" |
9 #include "content/common/gpu/image_transport_surface_iosurface_mac.h" | 9 #include "content/common/gpu/image_transport_surface_iosurface_mac.h" |
10 #include "ui/base/cocoa/remote_layer_api.h" | 10 #include "ui/base/cocoa/remote_layer_api.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 if (!helper_->Initialize()) | 50 if (!helper_->Initialize()) |
51 return false; | 51 return false; |
52 | 52 |
53 helper_->stub()->AddDestructionObserver(this); | 53 helper_->stub()->AddDestructionObserver(this); |
54 return true; | 54 return true; |
55 } | 55 } |
56 | 56 |
57 void ImageTransportSurfaceFBO::Destroy() { | 57 void ImageTransportSurfaceFBO::Destroy() { |
58 DestroyFramebuffer(); | 58 DestroyFramebuffer(); |
59 | |
60 helper_->Destroy(); | |
61 } | 59 } |
62 | 60 |
63 bool ImageTransportSurfaceFBO::DeferDraws() { | 61 bool ImageTransportSurfaceFBO::DeferDraws() { |
64 storage_provider_->WillWriteToBackbuffer(); | 62 storage_provider_->WillWriteToBackbuffer(); |
65 // We should not have a pending send when we are drawing the next frame. | 63 // We should not have a pending send when we are drawing the next frame. |
66 DCHECK(!is_swap_buffers_send_pending_); | 64 DCHECK(!is_swap_buffers_send_pending_); |
67 return false; | 65 return false; |
68 } | 66 } |
69 | 67 |
70 bool ImageTransportSurfaceFBO::IsOffscreen() { | 68 bool ImageTransportSurfaceFBO::IsOffscreen() { |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 return; | 311 return; |
314 } | 312 } |
315 | 313 |
316 has_complete_framebuffer_ = true; | 314 has_complete_framebuffer_ = true; |
317 | 315 |
318 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, previous_texture_id); | 316 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, previous_texture_id); |
319 // The FBO remains bound for this GL context. | 317 // The FBO remains bound for this GL context. |
320 } | 318 } |
321 | 319 |
322 } // namespace content | 320 } // namespace content |
OLD | NEW |