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_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 5 #ifndef UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
6 #define UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 6 #define UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
7 | 7 |
8 #include <d3d9.h> | 8 #include <d3d9.h> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // window has been resized. | 95 // window has been resized. |
96 gfx::Size present_size_; | 96 gfx::Size present_size_; |
97 | 97 |
98 // This is a shared texture that is being presented from. | 98 // This is a shared texture that is being presented from. |
99 base::win::ScopedComPtr<IDirect3DTexture9> source_texture_; | 99 base::win::ScopedComPtr<IDirect3DTexture9> source_texture_; |
100 | 100 |
101 // The swap chain is presented to the child window. Copy semantics | 101 // The swap chain is presented to the child window. Copy semantics |
102 // are used so it is possible to represent it to quickly validate the window. | 102 // are used so it is possible to represent it to quickly validate the window. |
103 base::win::ScopedComPtr<IDirect3DSwapChain9> swap_chain_; | 103 base::win::ScopedComPtr<IDirect3DSwapChain9> swap_chain_; |
104 | 104 |
105 // Whether surfaces are flipped vertically prior to presentation. | |
106 bool reverse_rows_; | |
107 | |
108 bool hidden_; | 105 bool hidden_; |
109 | 106 |
110 DISALLOW_COPY_AND_ASSIGN(AcceleratedPresenter); | 107 DISALLOW_COPY_AND_ASSIGN(AcceleratedPresenter); |
111 }; | 108 }; |
112 | 109 |
113 class SURFACE_EXPORT AcceleratedSurface { | 110 class SURFACE_EXPORT AcceleratedSurface { |
114 public: | 111 public: |
115 AcceleratedSurface(gfx::NativeWindow window); | 112 AcceleratedSurface(gfx::NativeWindow window); |
116 ~AcceleratedSurface(); | 113 ~AcceleratedSurface(); |
117 | 114 |
(...skipping 13 matching lines...) Expand all Loading... |
131 | 128 |
132 // Indicates that the surface has become invisible. | 129 // Indicates that the surface has become invisible. |
133 void WasHidden(); | 130 void WasHidden(); |
134 | 131 |
135 private: | 132 private: |
136 const scoped_refptr<AcceleratedPresenter> presenter_; | 133 const scoped_refptr<AcceleratedPresenter> presenter_; |
137 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); | 134 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); |
138 }; | 135 }; |
139 | 136 |
140 #endif // UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 137 #endif // UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
OLD | NEW |