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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 return NULL; | 157 return NULL; |
158 } | 158 } |
159 | 159 |
160 void* ImageTransportSurfaceFBO::GetDisplay() { | 160 void* ImageTransportSurfaceFBO::GetDisplay() { |
161 return NULL; | 161 return NULL; |
162 } | 162 } |
163 | 163 |
164 void ImageTransportSurfaceFBO::OnBufferPresented( | 164 void ImageTransportSurfaceFBO::OnBufferPresented( |
165 const AcceleratedSurfaceMsg_BufferPresented_Params& params) { | 165 const AcceleratedSurfaceMsg_BufferPresented_Params& params) { |
166 context_->share_group()->SetRendererID(params.renderer_id); | 166 context_->share_group()->SetRendererID(params.renderer_id); |
167 storage_provider_->SwapBuffersAckedByBrowser(); | 167 storage_provider_->SwapBuffersAckedByBrowser(params.disable_throttling); |
168 } | 168 } |
169 | 169 |
170 void ImageTransportSurfaceFBO::OnResize(gfx::Size size, | 170 void ImageTransportSurfaceFBO::OnResize(gfx::Size size, |
171 float scale_factor) { | 171 float scale_factor) { |
172 TRACE_EVENT2("gpu", "ImageTransportSurfaceFBO::OnResize", | 172 TRACE_EVENT2("gpu", "ImageTransportSurfaceFBO::OnResize", |
173 "old_width", size_.width(), "new_width", size.width()); | 173 "old_width", size_.width(), "new_width", size.width()); |
174 // Caching |context_| from OnMakeCurrent. It should still be current. | 174 // Caching |context_| from OnMakeCurrent. It should still be current. |
175 DCHECK(context_->IsCurrent(this)); | 175 DCHECK(context_->IsCurrent(this)); |
176 | 176 |
177 size_ = size; | 177 size_ = size; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 return; | 310 return; |
311 } | 311 } |
312 | 312 |
313 has_complete_framebuffer_ = true; | 313 has_complete_framebuffer_ = true; |
314 | 314 |
315 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, previous_texture_id); | 315 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, previous_texture_id); |
316 // The FBO remains bound for this GL context. | 316 // The FBO remains bound for this GL context. |
317 } | 317 } |
318 | 318 |
319 } // namespace content | 319 } // namespace content |
OLD | NEW |