OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
7 | 7 |
8 #include "cc/layers/delegated_frame_provider.h" | 8 #include "cc/layers/delegated_frame_provider.h" |
9 #include "cc/layers/delegated_frame_resource_collection.h" | 9 #include "cc/layers/delegated_frame_resource_collection.h" |
10 #include "cc/output/copy_output_result.h" | 10 #include "cc/output/copy_output_result.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 // The DelegatedFrameHostClient is the interface from the DelegatedFrameHost, | 36 // The DelegatedFrameHostClient is the interface from the DelegatedFrameHost, |
37 // which manages delegated frames, and the ui::Compositor being used to | 37 // which manages delegated frames, and the ui::Compositor being used to |
38 // display them. | 38 // display them. |
39 class CONTENT_EXPORT DelegatedFrameHostClient { | 39 class CONTENT_EXPORT DelegatedFrameHostClient { |
40 public: | 40 public: |
41 virtual ui::Compositor* GetCompositor() const = 0; | 41 virtual ui::Compositor* GetCompositor() const = 0; |
42 virtual ui::Layer* GetLayer() = 0; | 42 virtual ui::Layer* GetLayer() = 0; |
43 virtual RenderWidgetHostImpl* GetHost() = 0; | 43 virtual RenderWidgetHostImpl* GetHost() = 0; |
44 virtual void SchedulePaintInRect(const gfx::Rect& damage_rect_in_dip) = 0; | 44 virtual void SchedulePaintInRect(const gfx::Rect& damage_rect_in_dip) = 0; |
| 45 virtual void DelegatedCompositorDidSwapBuffers() = 0; |
| 46 virtual void DelegatedCompositorAbortedSwapBuffers() = 0; |
45 virtual bool IsVisible() = 0; | 47 virtual bool IsVisible() = 0; |
46 virtual scoped_ptr<ResizeLock> CreateResizeLock( | 48 virtual scoped_ptr<ResizeLock> CreateResizeLock( |
47 bool defer_compositor_lock) = 0; | 49 bool defer_compositor_lock) = 0; |
48 virtual gfx::Size DesiredFrameSize() = 0; | 50 virtual gfx::Size DesiredFrameSize() = 0; |
49 | 51 |
50 // TODO(ccameron): It is likely that at least one of these two functions is | 52 // TODO(ccameron): It is likely that at least one of these two functions is |
51 // redundant. Find which one, and delete it. | 53 // redundant. Find which one, and delete it. |
52 virtual float CurrentDeviceScaleFactor() = 0; | 54 virtual float CurrentDeviceScaleFactor() = 0; |
53 virtual gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) = 0; | 55 virtual gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) = 0; |
54 | 56 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 // YUV readback pipeline. | 279 // YUV readback pipeline. |
278 scoped_ptr<content::ReadbackYUVInterface> | 280 scoped_ptr<content::ReadbackYUVInterface> |
279 yuv_readback_pipeline_; | 281 yuv_readback_pipeline_; |
280 | 282 |
281 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 283 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
282 }; | 284 }; |
283 | 285 |
284 } // namespace content | 286 } // namespace content |
285 | 287 |
286 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 288 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
OLD | NEW |