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

Side by Side Diff: examples/ganesh_app/ganesh_view.h

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch 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 | « examples/ganesh_app/ganesh_app.cc ('k') | examples/ganesh_app/texture_uploader.h » ('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 #ifndef EXAMPLES_GANESH_APP_GANESH_VIEW_H_ 5 #ifndef EXAMPLES_GANESH_APP_GANESH_VIEW_H_
6 #define EXAMPLES_GANESH_APP_GANESH_VIEW_H_ 6 #define EXAMPLES_GANESH_APP_GANESH_VIEW_H_
7 7
8 #include "examples/ganesh_app/texture_uploader.h" 8 #include "examples/ganesh_app/texture_uploader.h"
9 #include "mojo/gpu/gl_context.h" 9 #include "mojo/gpu/gl_context.h"
10 #include "mojo/services/surfaces/public/interfaces/surface_id.mojom.h" 10 #include "mojo/services/surfaces/public/interfaces/surface_id.mojom.h"
11 #include "mojo/services/view_manager/public/cpp/view_observer.h" 11 #include "mojo/services/view_manager/public/cpp/view_observer.h"
12 #include "mojo/skia/ganesh_context.h" 12 #include "mojo/skia/ganesh_context.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 class Shell; 15 class Shell;
16 } 16 }
17 17
18 namespace examples { 18 namespace examples {
19 19
20 class GaneshView : public TextureUploader::Client, public mojo::ViewObserver { 20 class GaneshView : public TextureUploader::Client, public mojo::ViewObserver {
21 public: 21 public:
22 GaneshView(mojo::Shell* shell, mojo::View* view); 22 GaneshView(mojo::Shell* shell, mojo::View* view);
23 ~GaneshView(); 23 ~GaneshView() override;
24 24
25 private: 25 private:
26 void OnViewDestroyed(mojo::View* view) override; 26 void OnViewDestroyed(mojo::View* view) override;
27 void OnViewBoundsChanged(mojo::View* view, 27 void OnViewBoundsChanged(mojo::View* view,
28 const mojo::Rect& old_bounds, 28 const mojo::Rect& old_bounds,
29 const mojo::Rect& new_bounds) override; 29 const mojo::Rect& new_bounds) override;
30 30
31 void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) override; 31 void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) override;
32 32
33 void Draw(const mojo::Size& size); 33 void Draw(const mojo::Size& size);
34 34
35 mojo::View* view_; 35 mojo::View* view_;
36 base::WeakPtr<mojo::GLContext> gl_context_; 36 base::WeakPtr<mojo::GLContext> gl_context_;
37 mojo::GaneshContext gr_context_; 37 mojo::GaneshContext gr_context_;
38 TextureUploader texture_uploader_; 38 TextureUploader texture_uploader_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(GaneshView); 40 DISALLOW_COPY_AND_ASSIGN(GaneshView);
41 }; 41 };
42 42
43 } // namespace examples 43 } // namespace examples
44 44
45 #endif // EXAMPLES_GANESH_APP_GANESH_VIEW_H_ 45 #endif // EXAMPLES_GANESH_APP_GANESH_VIEW_H_
OLDNEW
« no previous file with comments | « examples/ganesh_app/ganesh_app.cc ('k') | examples/ganesh_app/texture_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698