| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // while compositor is in software only mode, either after compositor is | 73 // while compositor is in software only mode, either after compositor is |
| 74 // first created or after ReleaseHwDraw is called. It is invalid to | 74 // first created or after ReleaseHwDraw is called. It is invalid to |
| 75 // DemandDrawHw before this returns true. | 75 // DemandDrawHw before this returns true. |
| 76 virtual bool InitializeHwDraw() = 0; | 76 virtual bool InitializeHwDraw() = 0; |
| 77 | 77 |
| 78 // Reverse of InitializeHwDraw above. Can only be called while hardware draw | 78 // Reverse of InitializeHwDraw above. Can only be called while hardware draw |
| 79 // is already initialized. Brings compositor back to software only mode and | 79 // is already initialized. Brings compositor back to software only mode and |
| 80 // releases all hardware resources. | 80 // releases all hardware resources. |
| 81 virtual void ReleaseHwDraw() = 0; | 81 virtual void ReleaseHwDraw() = 0; |
| 82 | 82 |
| 83 // Get the share context of the compositor. The returned context is owned | |
| 84 // by the compositor and is only valid between InitializeHwDraw and | |
| 85 // ReleaseHwDraw. | |
| 86 virtual gpu::GLInProcessContext* GetShareContext() = 0; | |
| 87 | |
| 88 // "On demand" hardware draw. The content is first clipped to |damage_area|, | 83 // "On demand" hardware draw. The content is first clipped to |damage_area|, |
| 89 // then transformed through |transform|, and finally clipped to |view_size|. | 84 // then transformed through |transform|, and finally clipped to |view_size|. |
| 90 virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw( | 85 virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw( |
| 91 gfx::Size surface_size, | 86 gfx::Size surface_size, |
| 92 const gfx::Transform& transform, | 87 const gfx::Transform& transform, |
| 93 gfx::Rect viewport, | 88 gfx::Rect viewport, |
| 94 gfx::Rect clip, | 89 gfx::Rect clip, |
| 95 gfx::Rect viewport_rect_for_tile_priority, | 90 gfx::Rect viewport_rect_for_tile_priority, |
| 96 const gfx::Transform& transform_for_tile_priority) = 0; | 91 const gfx::Transform& transform_for_tile_priority) = 0; |
| 97 | 92 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 112 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). | 107 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). |
| 113 virtual void DidChangeRootLayerScrollOffset() = 0; | 108 virtual void DidChangeRootLayerScrollOffset() = 0; |
| 114 | 109 |
| 115 protected: | 110 protected: |
| 116 virtual ~SynchronousCompositor() {} | 111 virtual ~SynchronousCompositor() {} |
| 117 }; | 112 }; |
| 118 | 113 |
| 119 } // namespace content | 114 } // namespace content |
| 120 | 115 |
| 121 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 116 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| OLD | NEW |