| 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 30 matching lines...) Expand all Loading... |
| 41 // instance as needed, but only if |client| is non-nullptr. | 41 // instance as needed, but only if |client| is non-nullptr. |
| 42 static void SetClientForWebContents(WebContents* contents, | 42 static void SetClientForWebContents(WebContents* contents, |
| 43 SynchronousCompositorClient* client); | 43 SynchronousCompositorClient* client); |
| 44 | 44 |
| 45 static void SetGpuService( | 45 static void SetGpuService( |
| 46 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 46 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); |
| 47 | 47 |
| 48 // "On demand" hardware draw. The content is first clipped to |damage_area|, | 48 // "On demand" hardware draw. The content is first clipped to |damage_area|, |
| 49 // then transformed through |transform|, and finally clipped to |view_size|. | 49 // then transformed through |transform|, and finally clipped to |view_size|. |
| 50 virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw( | 50 virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw( |
| 51 gfx::Size surface_size, | 51 const gfx::Size& surface_size, |
| 52 const gfx::Transform& transform, | 52 const gfx::Transform& transform, |
| 53 gfx::Rect viewport, | 53 const gfx::Rect& viewport, |
| 54 gfx::Rect clip, | 54 const gfx::Rect& clip, |
| 55 gfx::Rect viewport_rect_for_tile_priority, | 55 const gfx::Rect& viewport_rect_for_tile_priority, |
| 56 const gfx::Transform& transform_for_tile_priority) = 0; | 56 const gfx::Transform& transform_for_tile_priority) = 0; |
| 57 | 57 |
| 58 // For delegated rendering, return resources from parent compositor to this. | 58 // For delegated rendering, return resources from parent compositor to this. |
| 59 // Note that all resources must be returned before ReleaseHwDraw. | 59 // Note that all resources must be returned before ReleaseHwDraw. |
| 60 virtual void ReturnResources(const cc::CompositorFrameAck& frame_ack) = 0; | 60 virtual void ReturnResources(const cc::CompositorFrameAck& frame_ack) = 0; |
| 61 | 61 |
| 62 // "On demand" SW draw, into the supplied canvas (observing the transform | 62 // "On demand" SW draw, into the supplied canvas (observing the transform |
| 63 // and clip set there-in). | 63 // and clip set there-in). |
| 64 virtual bool DemandDrawSw(SkCanvas* canvas) = 0; | 64 virtual bool DemandDrawSw(SkCanvas* canvas) = 0; |
| 65 | 65 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 80 // and if any input animation is active, it should tick now. | 80 // and if any input animation is active, it should tick now. |
| 81 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; | 81 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; |
| 82 | 82 |
| 83 protected: | 83 protected: |
| 84 virtual ~SynchronousCompositor() {} | 84 virtual ~SynchronousCompositor() {} |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace content | 87 } // namespace content |
| 88 | 88 |
| 89 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 89 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| OLD | NEW |