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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 11090075: Expose the WebGraphicsContext3D for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/native_window_jni.h> 7 #include <android/native_window_jni.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 { 54 {
55 return m_context3D.get(); 55 return m_context3D.get();
56 } 56 }
57 57
58 virtual void sendFrameToParentCompositor( 58 virtual void sendFrameToParentCompositor(
59 const WebKit::WebCompositorFrame&) OVERRIDE 59 const WebKit::WebCompositorFrame&) OVERRIDE
60 { 60 {
61 } 61 }
62 62
63 private: 63 private:
64 scoped_ptr<WebKit::WebGraphicsContext3D> m_context3D; 64 scoped_ptr<WebKit::WebGraphicsContext3D> m_context3D;
piman 2012/10/12 16:38:48 I just realize because of this CL, both this and t
no sievers 2012/10/12 16:42:43 Actually they ImageTransportFactory has its own co
65 Capabilities m_capabilities; 65 Capabilities m_capabilities;
66 WebKit::WebCompositorOutputSurfaceClient* m_client; 66 WebKit::WebCompositorOutputSurfaceClient* m_client;
67 }; 67 };
68 68
69 } // anonymous namespace 69 } // anonymous namespace
70 70
71 namespace content { 71 namespace content {
72 72
73 // static 73 // static
74 Compositor* Compositor::Create() { 74 Compositor* Compositor::Create() {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 root_layer_->setBounds(size); 168 root_layer_->setBounds(size);
169 } 169 }
170 170
171 bool CompositorImpl::CompositeAndReadback(void *pixels, const gfx::Rect& rect) { 171 bool CompositorImpl::CompositeAndReadback(void *pixels, const gfx::Rect& rect) {
172 if (host_.get()) 172 if (host_.get())
173 return host_->compositeAndReadback(pixels, rect); 173 return host_->compositeAndReadback(pixels, rect);
174 else 174 else
175 return false; 175 return false;
176 } 176 }
177 177
178 WebKit::WebGraphicsContext3D* CompositorImpl::GetContext3D() {
179 return ImageTransportFactoryAndroid::GetInstance()->GetContext3D();
180 }
181
178 void CompositorImpl::updateAnimations(double frameBeginTime) { 182 void CompositorImpl::updateAnimations(double frameBeginTime) {
179 } 183 }
180 184
181 void CompositorImpl::layout() { 185 void CompositorImpl::layout() {
182 } 186 }
183 187
184 void CompositorImpl::applyScrollAndScale(const WebKit::WebSize& scrollDelta, 188 void CompositorImpl::applyScrollAndScale(const WebKit::WebSize& scrollDelta,
185 float scaleFactor) { 189 float scaleFactor) {
186 } 190 }
187 191
(...skipping 29 matching lines...) Expand all
217 void CompositorImpl::didCommitAndDrawFrame() { 221 void CompositorImpl::didCommitAndDrawFrame() {
218 } 222 }
219 223
220 void CompositorImpl::didCompleteSwapBuffers() { 224 void CompositorImpl::didCompleteSwapBuffers() {
221 } 225 }
222 226
223 void CompositorImpl::scheduleComposite() { 227 void CompositorImpl::scheduleComposite() {
224 } 228 }
225 229
226 } // namespace content 230 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698