| 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 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "gpu/command_buffer/service/in_process_command_buffer.h" | 10 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 static void SetGpuService( | 44 static void SetGpuService( |
| 45 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 45 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); |
| 46 | 46 |
| 47 // By default, synchronous compopsitor records the full layer, not only | 47 // By default, synchronous compopsitor records the full layer, not only |
| 48 // what is inside and around the view port. This can be used to switch | 48 // what is inside and around the view port. This can be used to switch |
| 49 // between this record-full-layer behavior and normal record-around-viewport | 49 // between this record-full-layer behavior and normal record-around-viewport |
| 50 // behavior. | 50 // behavior. |
| 51 static void SetRecordFullDocument(bool record_full_document); | 51 static void SetRecordFullDocument(bool record_full_document); |
| 52 | 52 |
| 53 // Turn on using ipc-based command buffer at run time. This should be removed |
| 54 // once this feature is fully launched. |
| 55 static void SetUseIpcCommandBuffer(); |
| 56 |
| 53 // "On demand" hardware draw. The content is first clipped to |damage_area|, | 57 // "On demand" hardware draw. The content is first clipped to |damage_area|, |
| 54 // then transformed through |transform|, and finally clipped to |view_size|. | 58 // then transformed through |transform|, and finally clipped to |view_size|. |
| 55 virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw( | 59 virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw( |
| 56 gfx::Size surface_size, | 60 gfx::Size surface_size, |
| 57 const gfx::Transform& transform, | 61 const gfx::Transform& transform, |
| 58 gfx::Rect viewport, | 62 gfx::Rect viewport, |
| 59 gfx::Rect clip, | 63 gfx::Rect clip, |
| 60 gfx::Rect viewport_rect_for_tile_priority, | 64 gfx::Rect viewport_rect_for_tile_priority, |
| 61 const gfx::Transform& transform_for_tile_priority) = 0; | 65 const gfx::Transform& transform_for_tile_priority) = 0; |
| 62 | 66 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 81 // starts off as inactive and needs a SetActive(true) call to begin. | 85 // starts off as inactive and needs a SetActive(true) call to begin. |
| 82 virtual void SetIsActive(bool is_active) = 0; | 86 virtual void SetIsActive(bool is_active) = 0; |
| 83 | 87 |
| 84 protected: | 88 protected: |
| 85 virtual ~SynchronousCompositor() {} | 89 virtual ~SynchronousCompositor() {} |
| 86 }; | 90 }; |
| 87 | 91 |
| 88 } // namespace content | 92 } // namespace content |
| 89 | 93 |
| 90 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 94 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| OLD | NEW |