Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: content/common/gpu/image_transport_surface_calayer_mac.mm

Issue 1023673006: Mac: Reset active texture state when drawing CAOpenGLLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698