OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/renderer/android/synchronous_compositor_output_surface.h" | 5 #include "content/renderer/android/synchronous_compositor_output_surface.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
11 #include "cc/output/compositor_frame_ack.h" | 11 #include "cc/output/compositor_frame_ack.h" |
12 #include "cc/output/output_surface_client.h" | 12 #include "cc/output/output_surface_client.h" |
13 #include "cc/output/software_output_device.h" | 13 #include "cc/output/software_output_device.h" |
14 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 14 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
15 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
16 #include "content/public/renderer/android/synchronous_compositor_client.h" | 16 #include "content/public/renderer/android/synchronous_compositor_client.h" |
17 #include "content/public/renderer/content_renderer_client.h" | 17 #include "content/public/renderer/content_renderer_client.h" |
18 #include "skia/ext/refptr.h" | 18 #include "skia/ext/refptr.h" |
19 #include "third_party/skia/include/core/SkCanvas.h" | 19 #include "third_party/skia/include/core/SkCanvas.h" |
20 #include "third_party/skia/include/core/SkDevice.h" | 20 #include "third_party/skia/include/core/SkDevice.h" |
21 #include "third_party/skia/include/core/SkPicture.h" | 21 #include "third_party/skia/include/core/SkPicture.h" |
22 #include "ui/gfx/rect_conversions.h" | 22 #include "ui/gfx/rect_conversions.h" |
23 #include "ui/gfx/skia_util.h" | 23 #include "ui/gfx/skia_util.h" |
24 #include "ui/gfx/transform.h" | 24 #include "ui/gfx/transform.h" |
25 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | 25 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" |
26 | 26 |
27 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; | 27 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // TODO(boliu): RenderThreadImpl should create in process contexts as well. | 33 // TODO(boliu): RenderThreadImpl should create in process contexts as well. |
34 scoped_ptr<WebKit::WebGraphicsContext3D> CreateWebGraphicsContext3D() { | 34 scoped_ptr<WebKit::WebGraphicsContext3D> CreateWebGraphicsContext3D() { |
35 if (!CommandLine::ForCurrentProcess()->HasSwitch("testing-webview-gl-mode")) | 35 if (!CommandLine::ForCurrentProcess()->HasSwitch("testing-webview-gl-mode")) |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // Not using base::NonThreadSafe as we want to enforce a more exacting threading | 211 // Not using base::NonThreadSafe as we want to enforce a more exacting threading |
212 // requirement: SynchronousCompositorOutputSurface() must only be used by | 212 // requirement: SynchronousCompositorOutputSurface() must only be used by |
213 // embedders that supply their own compositor loop via | 213 // embedders that supply their own compositor loop via |
214 // OverrideCompositorMessageLoop(). | 214 // OverrideCompositorMessageLoop(). |
215 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { | 215 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { |
216 return base::MessageLoop::current() && (base::MessageLoop::current() == | 216 return base::MessageLoop::current() && (base::MessageLoop::current() == |
217 GetContentClient()->renderer()->OverrideCompositorMessageLoop()); | 217 GetContentClient()->renderer()->OverrideCompositorMessageLoop()); |
218 } | 218 } |
219 | 219 |
220 } // namespace content | 220 } // namespace content |
OLD | NEW |