OLD | NEW |
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 #include "mojo/examples/compositor_app/compositor_host.h" | 5 #include "mojo/examples/compositor_app/compositor_host.h" |
6 | 6 |
7 #include "cc/layers/layer.h" | 7 #include "cc/layers/layer.h" |
8 #include "cc/layers/solid_color_layer.h" | 8 #include "cc/layers/solid_color_layer.h" |
9 #include "cc/output/context_provider.h" | 9 #include "cc/output/context_provider.h" |
10 #include "cc/output/output_surface.h" | 10 #include "cc/output/output_surface.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 static const double kDegreesPerSecond = 70.0; | 101 static const double kDegreesPerSecond = 70.0; |
102 double child_rotation_degrees = kDegreesPerSecond * frame_begin_time; | 102 double child_rotation_degrees = kDegreesPerSecond * frame_begin_time; |
103 gfx::Transform child_transform; | 103 gfx::Transform child_transform; |
104 child_transform.Translate(200, 200); | 104 child_transform.Translate(200, 200); |
105 child_transform.Rotate(child_rotation_degrees); | 105 child_transform.Rotate(child_rotation_degrees); |
106 child_layer_->SetTransform(child_transform); | 106 child_layer_->SetTransform(child_transform); |
107 tree_->SetNeedsAnimate(); | 107 tree_->SetNeedsAnimate(); |
108 } | 108 } |
109 | 109 |
110 void CompositorHost::Layout() {} | 110 void CompositorHost::Layout() {} |
111 void CompositorHost::ApplyScrollAndScale(gfx::Vector2d scroll_delta, | 111 void CompositorHost::ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, |
112 float page_scale) {} | 112 float page_scale) {} |
113 | 113 |
114 scoped_ptr<cc::OutputSurface> CompositorHost::CreateOutputSurface( | 114 scoped_ptr<cc::OutputSurface> CompositorHost::CreateOutputSurface( |
115 bool fallback) { | 115 bool fallback) { |
116 return make_scoped_ptr( | 116 return make_scoped_ptr( |
117 new cc::OutputSurface(new MojoContextProvider(gles2_client_impl_))); | 117 new cc::OutputSurface(new MojoContextProvider(gles2_client_impl_))); |
118 } | 118 } |
119 | 119 |
120 void CompositorHost::DidInitializeOutputSurface(bool success) {} | 120 void CompositorHost::DidInitializeOutputSurface(bool success) {} |
121 | 121 |
122 void CompositorHost::WillCommit() {} | 122 void CompositorHost::WillCommit() {} |
123 void CompositorHost::DidCommit() {} | 123 void CompositorHost::DidCommit() {} |
124 void CompositorHost::DidCommitAndDrawFrame() {} | 124 void CompositorHost::DidCommitAndDrawFrame() {} |
125 void CompositorHost::DidCompleteSwapBuffers() {} | 125 void CompositorHost::DidCompleteSwapBuffers() {} |
126 | 126 |
127 scoped_refptr<cc::ContextProvider> CompositorHost::OffscreenContextProvider() { | 127 scoped_refptr<cc::ContextProvider> CompositorHost::OffscreenContextProvider() { |
128 return NULL; | 128 return NULL; |
129 } | 129 } |
130 | 130 |
131 } // namespace examples | 131 } // namespace examples |
132 } // namespace mojo | 132 } // namespace mojo |
OLD | NEW |