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

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

Issue 753933002: MacViews: Move content::AcceleratedWidget to new component, ui/accelerated_widget_mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20141124-MacViews-MoveSoftwareLayerMac-fromcl
Patch Set: gn check Created 6 years 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 | « content/common/BUILD.gn ('k') | content/common/gpu/image_transport_surface_iosurface_mac.cc » ('j') | 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"
11 #include "content/common/gpu/surface_handle_types_mac.h" 11 #include "ui/accelerated_widget_mac/surface_handle_types.h"
12 #include "ui/base/cocoa/animation_utils.h" 12 #include "ui/base/cocoa/animation_utils.h"
13 #include "ui/gfx/geometry/size_conversions.h" 13 #include "ui/gfx/geometry/size_conversions.h"
14 #include "ui/gl/gl_gl_api_implementation.h" 14 #include "ui/gl/gl_gl_api_implementation.h"
15 #include "ui/gl/gl_switches.h" 15 #include "ui/gl/gl_switches.h"
16 16
17 namespace { 17 namespace {
18 const size_t kFramesToKeepCAContextAfterDiscard = 2; 18 const size_t kFramesToKeepCAContextAfterDiscard = 2;
19 } 19 }
20 20
21 @interface ImageTransportLayer : CAOpenGLLayer { 21 @interface ImageTransportLayer : CAOpenGLLayer {
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 // now never come, so release the pressure now. 330 // now never come, so release the pressure now.
331 UnblockBrowserIfNeeded(); 331 UnblockBrowserIfNeeded();
332 } 332 }
333 333
334 void CALayerStorageProvider::UnblockBrowserIfNeeded() { 334 void CALayerStorageProvider::UnblockBrowserIfNeeded() {
335 if (!has_pending_draw_) 335 if (!has_pending_draw_)
336 return; 336 return;
337 pending_draw_weak_factory_.InvalidateWeakPtrs(); 337 pending_draw_weak_factory_.InvalidateWeakPtrs();
338 has_pending_draw_ = false; 338 has_pending_draw_ = false;
339 transport_surface_->SendSwapBuffers( 339 transport_surface_->SendSwapBuffers(
340 SurfaceHandleFromCAContextID([context_ contextId]), 340 ui::SurfaceHandleFromCAContextID([context_ contextId]),
341 fbo_pixel_size_, 341 fbo_pixel_size_,
342 fbo_scale_factor_); 342 fbo_scale_factor_);
343 } 343 }
344 344
345 } // namespace content 345 } // namespace content
OLDNEW
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/gpu/image_transport_surface_iosurface_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698