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 "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 // Reverse of InitializeHwDraw above. Can only be called while hardware draw | 49 // Reverse of InitializeHwDraw above. Can only be called while hardware draw |
50 // is already initialized. Brings compositor back to software only mode and | 50 // is already initialized. Brings compositor back to software only mode and |
51 // releases all hardware resources. | 51 // releases all hardware resources. |
52 virtual void ReleaseHwDraw() = 0; | 52 virtual void ReleaseHwDraw() = 0; |
53 | 53 |
54 // "On demand" hardware draw. The content is first clipped to |damage_area|, | 54 // "On demand" hardware draw. The content is first clipped to |damage_area|, |
55 // then transformed through |transform|, and finally clipped to |view_size| | 55 // then transformed through |transform|, and finally clipped to |view_size| |
56 // and by the existing stencil buffer if any. | 56 // and by the existing stencil buffer if any. |
57 virtual bool DemandDrawHw( | 57 virtual bool DemandDrawHw( |
58 gfx::Size view_size, | 58 gfx::Size surface_size, |
59 const gfx::Transform& transform, | 59 const gfx::Transform& transform, |
60 gfx::Rect damage_area, | 60 gfx::Rect viewport, |
| 61 gfx::Rect clip, |
61 bool stencil_enabled) = 0; | 62 bool stencil_enabled) = 0; |
62 | 63 |
63 // "On demand" SW draw, into the supplied canvas (observing the transform | 64 // "On demand" SW draw, into the supplied canvas (observing the transform |
64 // and clip set there-in). | 65 // and clip set there-in). |
65 virtual bool DemandDrawSw(SkCanvas* canvas) = 0; | 66 virtual bool DemandDrawSw(SkCanvas* canvas) = 0; |
66 | 67 |
67 // Should be called by the embedder after the embedder had modified the | 68 // Should be called by the embedder after the embedder had modified the |
68 // scroll offset of the root layer (as returned by | 69 // scroll offset of the root layer (as returned by |
69 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). | 70 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). |
70 virtual void DidChangeRootLayerScrollOffset() = 0; | 71 virtual void DidChangeRootLayerScrollOffset() = 0; |
71 | 72 |
72 protected: | 73 protected: |
73 virtual ~SynchronousCompositor() {} | 74 virtual ~SynchronousCompositor() {} |
74 }; | 75 }; |
75 | 76 |
76 } // namespace content | 77 } // namespace content |
77 | 78 |
78 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 79 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
OLD | NEW |