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

Side by Side Diff: mojo/examples/compositor_app/compositor_host.h

Issue 131153007: Send size to NativeViewportClient::OnCreated instead of GLES2Client::DidCreateContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix various issues Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_ 5 #ifndef MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_
6 #define MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_ 6 #define MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
11 #include "cc/trees/layer_tree_host_client.h" 11 #include "cc/trees/layer_tree_host_client.h"
12 #include "ui/gfx/size.h" 12 #include "ui/gfx/size.h"
13 13
14 namespace cc { 14 namespace cc {
15 class Layer; 15 class Layer;
16 class LayerTreeHost; 16 class LayerTreeHost;
17 } // namespace cc 17 } // namespace cc
18 18
19 namespace mojo { 19 namespace mojo {
20 namespace examples { 20 namespace examples {
21 class GLES2ClientImpl; 21 class GLES2ClientImpl;
22 22
23 class CompositorHost : public cc::LayerTreeHostClient { 23 class CompositorHost : public cc::LayerTreeHostClient {
24 public: 24 public:
25 explicit CompositorHost(GLES2ClientImpl* gles2_client_impl); 25 explicit CompositorHost(GLES2ClientImpl* gles2_client_impl);
26 virtual ~CompositorHost(); 26 virtual ~CompositorHost();
27 27
28 void DidCreateContext(gfx::Size viewport_size); 28 void SetSize(gfx::Size viewport_size);
29 void DidCreateContext();
29 30
30 // cc::LayerTreeHostClient implementation. 31 // cc::LayerTreeHostClient implementation.
31 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; 32 virtual void WillBeginMainFrame(int frame_id) OVERRIDE;
32 virtual void DidBeginMainFrame() OVERRIDE; 33 virtual void DidBeginMainFrame() OVERRIDE;
33 virtual void Animate(double frame_begin_time) OVERRIDE; 34 virtual void Animate(double frame_begin_time) OVERRIDE;
34 virtual void Layout() OVERRIDE; 35 virtual void Layout() OVERRIDE;
35 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, 36 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta,
36 float page_scale) OVERRIDE; 37 float page_scale) OVERRIDE;
37 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) 38 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback)
38 OVERRIDE; 39 OVERRIDE;
(...skipping 11 matching lines...) Expand all
50 GLES2ClientImpl* gles2_client_impl_; 51 GLES2ClientImpl* gles2_client_impl_;
51 scoped_ptr<cc::LayerTreeHost> tree_; 52 scoped_ptr<cc::LayerTreeHost> tree_;
52 scoped_refptr<cc::Layer> child_layer_; 53 scoped_refptr<cc::Layer> child_layer_;
53 base::Thread compositor_thread_; 54 base::Thread compositor_thread_;
54 }; 55 };
55 56
56 } // namespace examples 57 } // namespace examples
57 } // namespace mojo 58 } // namespace mojo
58 59
59 #endif // MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_ 60 #endif // MOJO_EXAMPLES_COMPOSITOR_APP_COMPOSITOR_HOST_H_
OLDNEW
« no previous file with comments | « mojo/examples/compositor_app/compositor_app.cc ('k') | mojo/examples/compositor_app/compositor_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698