| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_GFX_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 5 #ifndef UI_GFX_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
| 6 #define UI_GFX_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 6 #define UI_GFX_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // when it is safe to write to the surface on another thread. The lock for | 23 // when it is safe to write to the surface on another thread. The lock for |
| 24 // this surface will be held while the completion callback runs. | 24 // this surface will be held while the completion callback runs. |
| 25 void AsyncPresentAndAcknowledge(HWND window, | 25 void AsyncPresentAndAcknowledge(HWND window, |
| 26 const gfx::Size& size, | 26 const gfx::Size& size, |
| 27 int64 surface_id, | 27 int64 surface_id, |
| 28 const base::Closure& completion_task); | 28 const base::Closure& completion_task); |
| 29 | 29 |
| 30 // Synchronously present a frame with no acknowledgement. | 30 // Synchronously present a frame with no acknowledgement. |
| 31 bool Present(HWND window); | 31 bool Present(HWND window); |
| 32 | 32 |
| 33 // Temporarily release resources until a new surface is asynchronously |
| 34 // presented. Present will not be able to represent the last surface after |
| 35 // calling this and will return false. |
| 36 void Suspend(); |
| 37 |
| 33 private: | 38 private: |
| 34 linked_ptr<AcceleratedPresenter> presenter_; | 39 linked_ptr<AcceleratedPresenter> presenter_; |
| 35 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); | 40 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); |
| 36 }; | 41 }; |
| 37 | 42 |
| 38 #endif // UI_GFX_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 43 #endif // UI_GFX_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
| OLD | NEW |