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

Side by Side Diff: ui/gfx/gl/gl_surface_nsview.mm

Issue 8486020: compositor_unittests target is unimplmented on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address kbr's comments (#14) Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/gfx/gl/gl_surface_nsview.h"
6
7 #import <AppKit/NSOpenGL.h>
8 #import <AppKit/NSView.h>
9
10 #include "ui/gfx/gl/gl_context_nsview.h"
11
12 namespace gfx {
13
14 GLSurfaceNSView::GLSurfaceNSView(PluginWindowHandle view)
15 : view_(view),
16 context_(NULL) {
17 }
18
19 GLSurfaceNSView::~GLSurfaceNSView() {
20 }
21
22 void GLSurfaceNSView::Destroy() {
23 }
24
25 bool GLSurfaceNSView::IsOffscreen() {
26 return false;
27 }
28
29 bool GLSurfaceNSView::SwapBuffers() {
30 context_->FlushBuffer();
31 return true;
32 }
33
34 gfx::Size GLSurfaceNSView::GetSize() {
35 return gfx::Size(NSSizeToCGSize([view_ bounds].size));
36 }
37
38 void* GLSurfaceNSView::GetHandle() {
39 return view_;
40 }
41
42 void GLSurfaceNSView::SetGLContext(GLContextNSView* context) {
43 context_ = context;
44 }
45
46 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698