| 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_calayer_mac.h" | 5 #include "content/common/gpu/image_transport_surface_calayer_mac.h" |
| 6 | 6 |
| 7 #include <OpenGL/CGLRenderers.h> | 7 #include <OpenGL/CGLRenderers.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/mac/sdk_forward_declarations.h" | 10 #include "base/mac/sdk_forward_declarations.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 glLoadIdentity(); | 325 glLoadIdentity(); |
| 326 | 326 |
| 327 // Reset drawing state and draw a fullscreen quad. | 327 // Reset drawing state and draw a fullscreen quad. |
| 328 glUseProgram(0); | 328 glUseProgram(0); |
| 329 glDisable(GL_BLEND); | 329 glDisable(GL_BLEND); |
| 330 glDisable(GL_CULL_FACE); | 330 glDisable(GL_CULL_FACE); |
| 331 glDisable(GL_DEPTH_TEST); | 331 glDisable(GL_DEPTH_TEST); |
| 332 glDisable(GL_STENCIL_TEST); | 332 glDisable(GL_STENCIL_TEST); |
| 333 glDisable(GL_SCISSOR_TEST); | 333 glDisable(GL_SCISSOR_TEST); |
| 334 glColor4f(1, 1, 1, 1); | 334 glColor4f(1, 1, 1, 1); |
| 335 glActiveTexture(GL_TEXTURE0); |
| 335 glEnable(GL_TEXTURE_RECTANGLE_ARB); | 336 glEnable(GL_TEXTURE_RECTANGLE_ARB); |
| 336 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, fbo_texture_); | 337 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, fbo_texture_); |
| 337 glBegin(GL_QUADS); | 338 glBegin(GL_QUADS); |
| 338 { | 339 { |
| 339 glTexCoord2f(0, 0); | 340 glTexCoord2f(0, 0); |
| 340 glVertex2f(0, 0); | 341 glVertex2f(0, 0); |
| 341 | 342 |
| 342 glTexCoord2f(0, fbo_pixel_size_.height()); | 343 glTexCoord2f(0, fbo_pixel_size_.height()); |
| 343 glVertex2f(0, fbo_pixel_size_.height()); | 344 glVertex2f(0, fbo_pixel_size_.height()); |
| 344 | 345 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 return; | 385 return; |
| 385 pending_draw_weak_factory_.InvalidateWeakPtrs(); | 386 pending_draw_weak_factory_.InvalidateWeakPtrs(); |
| 386 has_pending_draw_ = false; | 387 has_pending_draw_ = false; |
| 387 transport_surface_->SendSwapBuffers( | 388 transport_surface_->SendSwapBuffers( |
| 388 ui::SurfaceHandleFromCAContextID([context_ contextId]), | 389 ui::SurfaceHandleFromCAContextID([context_ contextId]), |
| 389 fbo_pixel_size_, | 390 fbo_pixel_size_, |
| 390 fbo_scale_factor_); | 391 fbo_scale_factor_); |
| 391 } | 392 } |
| 392 | 393 |
| 393 } // namespace content | 394 } // namespace content |
| OLD | NEW |