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 "content/browser/android/in_process/synchronous_compositor_output_surfa
ce.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_output_surfa
ce.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
11 #include "cc/output/output_surface_client.h" | 11 #include "cc/output/output_surface_client.h" |
12 #include "cc/output/software_output_device.h" | 12 #include "cc/output/software_output_device.h" |
13 #include "content/browser/android/in_process/synchronous_compositor_external_beg
in_frame_source.h" | 13 #include "content/browser/android/in_process/synchronous_compositor_external_beg
in_frame_source.h" |
14 #include "content/browser/android/in_process/synchronous_compositor_impl.h" | 14 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
15 #include "content/browser/android/in_process/synchronous_compositor_registry.h" | 15 #include "content/browser/android/in_process/synchronous_compositor_registry.h" |
16 #include "content/browser/gpu/compositor_util.h" | 16 #include "content/browser/gpu/compositor_util.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "content/renderer/gpu/frame_swap_message_queue.h" | 18 #include "content/renderer/gpu/frame_swap_message_queue.h" |
19 #include "gpu/command_buffer/client/gles2_interface.h" | 19 #include "gpu/command_buffer/client/gles2_interface.h" |
20 #include "gpu/command_buffer/common/gpu_memory_allocation.h" | 20 #include "gpu/command_buffer/common/gpu_memory_allocation.h" |
21 #include "third_party/skia/include/core/SkCanvas.h" | 21 #include "third_party/skia/include/core/SkCanvas.h" |
22 #include "ui/gfx/rect_conversions.h" | 22 #include "ui/gfx/geometry/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 | 25 |
26 namespace content { | 26 namespace content { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 // Do not limit number of resources, so use an unrealistically high value. | 30 // Do not limit number of resources, so use an unrealistically high value. |
31 const size_t kNumResourcesLimit = 10 * 1000 * 1000; | 31 const size_t kNumResourcesLimit = 10 * 1000 * 1000; |
32 | 32 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 } | 279 } |
280 | 280 |
281 // Not using base::NonThreadSafe as we want to enforce a more exacting threading | 281 // Not using base::NonThreadSafe as we want to enforce a more exacting threading |
282 // requirement: SynchronousCompositorOutputSurface() must only be used on the UI | 282 // requirement: SynchronousCompositorOutputSurface() must only be used on the UI |
283 // thread. | 283 // thread. |
284 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { | 284 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { |
285 return BrowserThread::CurrentlyOn(BrowserThread::UI); | 285 return BrowserThread::CurrentlyOn(BrowserThread::UI); |
286 } | 286 } |
287 | 287 |
288 } // namespace content | 288 } // namespace content |
OLD | NEW |