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

Side by Side Diff: mojo/gpu/gl_context.cc

Issue 788343002: Restructure public side of gpu service. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 | « mojo/gpu/BUILD.gn ('k') | mojo/services/gpu/public/interfaces/BUILD.gn » ('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 "mojo/gpu/gl_context.h" 5 #include "mojo/gpu/gl_context.h"
6 6
7 #include "mojo/public/cpp/application/connect.h" 7 #include "mojo/public/cpp/application/connect.h"
8 #include "mojo/public/interfaces/application/shell.mojom.h" 8 #include "mojo/public/interfaces/application/shell.mojom.h"
9 #include "mojo/services/public/interfaces/gpu/gpu.mojom.h" 9 #include "mojo/services/gpu/public/interfaces/gpu.mojom.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 12
13 GLContext::Observer::~Observer() { 13 GLContext::Observer::~Observer() {
14 } 14 }
15 15
16 GLContext::GLContext(mojo::Shell* shell) : weak_factory_(this) { 16 GLContext::GLContext(mojo::Shell* shell) : weak_factory_(this) {
17 mojo::ServiceProviderPtr native_viewport; 17 mojo::ServiceProviderPtr native_viewport;
18 shell->ConnectToApplication("mojo:native_viewport_service", 18 shell->ConnectToApplication("mojo:native_viewport_service",
19 mojo::GetProxy(&native_viewport)); 19 mojo::GetProxy(&native_viewport));
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 void GLContext::ContextLostThunk(void* self) { 55 void GLContext::ContextLostThunk(void* self) {
56 static_cast<GLContext*>(self)->OnContextLost(); 56 static_cast<GLContext*>(self)->OnContextLost();
57 } 57 }
58 58
59 void GLContext::OnContextLost() { 59 void GLContext::OnContextLost() {
60 FOR_EACH_OBSERVER(Observer, observers_, OnContextLost()); 60 FOR_EACH_OBSERVER(Observer, observers_, OnContextLost());
61 } 61 }
62 62
63 } // namespace mojo 63 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/gpu/BUILD.gn ('k') | mojo/services/gpu/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698