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_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
6 #define UI_GFX_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 6 #define UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <d3d9.h> | 9 #include <d3d9.h> |
10 | 10 |
11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
15 #include "base/win/scoped_comptr.h" | 15 #include "base/win/scoped_comptr.h" |
16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
17 #include "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
18 #include "ui/gfx/surface/surface_export.h" | 18 #include "ui/surface/surface_export.h" |
19 | 19 |
20 class PresentThread; | 20 class PresentThread; |
21 | 21 |
22 class SURFACE_EXPORT AcceleratedPresenter | 22 class SURFACE_EXPORT AcceleratedPresenter |
23 : public base::RefCountedThreadSafe<AcceleratedPresenter> { | 23 : public base::RefCountedThreadSafe<AcceleratedPresenter> { |
24 public: | 24 public: |
25 typedef base::Callback<void(bool)> CompletionTaskl; | 25 typedef base::Callback<void(bool)> CompletionTaskl; |
26 | 26 |
27 explicit AcceleratedPresenter(gfx::NativeWindow window); | 27 explicit AcceleratedPresenter(gfx::NativeWindow window); |
28 | 28 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // Temporarily release resources until a new surface is asynchronously | 114 // Temporarily release resources until a new surface is asynchronously |
115 // presented. Present will not be able to represent the last surface after | 115 // presented. Present will not be able to represent the last surface after |
116 // calling this and will return false. | 116 // calling this and will return false. |
117 void Suspend(); | 117 void Suspend(); |
118 | 118 |
119 private: | 119 private: |
120 const scoped_refptr<AcceleratedPresenter> presenter_; | 120 const scoped_refptr<AcceleratedPresenter> presenter_; |
121 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); | 121 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); |
122 }; | 122 }; |
123 | 123 |
124 #endif // UI_GFX_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 124 #endif // UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
OLD | NEW |