OLD | NEW |
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 void CompositorImpl::layout() { | 178 void CompositorImpl::layout() { |
179 } | 179 } |
180 | 180 |
181 void CompositorImpl::applyScrollAndScale(const WebKit::WebSize& scrollDelta, | 181 void CompositorImpl::applyScrollAndScale(const WebKit::WebSize& scrollDelta, |
182 float scaleFactor) { | 182 float scaleFactor) { |
183 } | 183 } |
184 | 184 |
185 WebKit::WebCompositorOutputSurface* CompositorImpl::createOutputSurface() { | 185 WebKit::WebCompositorOutputSurface* CompositorImpl::createOutputSurface() { |
186 WebKit::WebGraphicsContext3D::Attributes attrs; | 186 WebKit::WebGraphicsContext3D::Attributes attrs; |
187 attrs.shareResources = true; | 187 attrs.shareResources = true; |
| 188 attrs.noAutomaticFlushes = true; |
188 GpuChannelHostFactory* factory = BrowserGpuChannelHostFactory::instance(); | 189 GpuChannelHostFactory* factory = BrowserGpuChannelHostFactory::instance(); |
189 GURL url("chrome://gpu/Compositor::createContext3D"); | 190 GURL url("chrome://gpu/Compositor::createContext3D"); |
190 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client; | 191 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client; |
191 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 192 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
192 new WebGraphicsContext3DCommandBufferImpl( | 193 new WebGraphicsContext3DCommandBufferImpl( |
193 surface_id_, | 194 surface_id_, |
194 url, | 195 url, |
195 factory, | 196 factory, |
196 swap_client)); | 197 swap_client)); |
197 if (!context->Initialize( | 198 if (!context->Initialize( |
(...skipping 17 matching lines...) Expand all Loading... |
215 } | 216 } |
216 | 217 |
217 void CompositorImpl::didCompleteSwapBuffers() { | 218 void CompositorImpl::didCompleteSwapBuffers() { |
218 } | 219 } |
219 | 220 |
220 void CompositorImpl::scheduleComposite() { | 221 void CompositorImpl::scheduleComposite() { |
221 client_->ScheduleComposite(); | 222 client_->ScheduleComposite(); |
222 } | 223 } |
223 | 224 |
224 } // namespace content | 225 } // namespace content |
OLD | NEW |