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

Side by Side Diff: ui/accelerated_widget_mac/io_surface_ns_gl_surface.h

Issue 1161853006: Mac: Add partial swap support to NSOpenGLContext path (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 5 years, 6 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_NS_GL_SURFACE_H_ 5 #ifndef UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_NS_GL_SURFACE_H_
6 #define UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_NS_GL_SURFACE_H_ 6 #define UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_NS_GL_SURFACE_H_
7 7
8 #include <Cocoa/Cocoa.h> 8 #include <Cocoa/Cocoa.h>
9 #include <OpenGL/OpenGL.h> 9 #include <OpenGL/OpenGL.h>
10 10
11 #include "base/mac/scoped_nsobject.h" 11 #include "base/mac/scoped_nsobject.h"
12 #include "ui/accelerated_widget_mac/io_surface_context.h" 12 #include "ui/accelerated_widget_mac/io_surface_context.h"
13 #include "ui/accelerated_widget_mac/io_surface_texture.h" 13 #include "ui/accelerated_widget_mac/io_surface_texture.h"
14 14
15 namespace ui { 15 namespace ui {
16 16
17 class IOSurfaceNSGLSurface { 17 class IOSurfaceNSGLSurface {
18 public: 18 public:
19 static IOSurfaceNSGLSurface* Create(NSView* view); 19 static IOSurfaceNSGLSurface* Create(NSView* view);
20 ~IOSurfaceNSGLSurface(); 20 ~IOSurfaceNSGLSurface();
21 21
22 // Called on the UI thread. 22 // Called on the UI thread.
23 bool GotFrame(IOSurfaceID io_surface_id, 23 bool GotFrame(IOSurfaceID io_surface_id,
24 gfx::Size pixel_size, 24 gfx::Size pixel_size,
25 float scale_factor); 25 float scale_factor,
26 gfx::Rect pixel_damage_rect);
26 27
27 private: 28 private:
28 explicit IOSurfaceNSGLSurface( 29 explicit IOSurfaceNSGLSurface(
29 NSView* view, 30 NSView* view,
30 base::scoped_nsobject<NSOpenGLContext> ns_gl_context, 31 base::scoped_nsobject<NSOpenGLContext> ns_gl_context,
31 scoped_refptr<ui::IOSurfaceTexture> iosurface); 32 scoped_refptr<ui::IOSurfaceTexture> iosurface);
32 NSView* view_; 33 NSView* view_;
33 scoped_refptr<ui::IOSurfaceTexture> iosurface_; 34 scoped_refptr<ui::IOSurfaceTexture> iosurface_;
34 base::scoped_nsobject<NSOpenGLContext> ns_gl_context_; 35 base::scoped_nsobject<NSOpenGLContext> ns_gl_context_;
35 }; 36 };
36 37
37 } // namespace ui 38 } // namespace ui
38 39
39 #endif // UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_NS_GL_SURFACE_H_ 40 #endif // UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_NS_GL_SURFACE_H_
OLDNEW
« no previous file with comments | « ui/accelerated_widget_mac/accelerated_widget_mac.mm ('k') | ui/accelerated_widget_mac/io_surface_ns_gl_surface.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698