| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // Schedule the presenter to release its reference to the shared surface. | 56 // Schedule the presenter to release its reference to the shared surface. |
| 57 void ReleaseSurface(); | 57 void ReleaseSurface(); |
| 58 | 58 |
| 59 // The public member functions are called on the main thread. | 59 // The public member functions are called on the main thread. |
| 60 bool Present(HDC dc); | 60 bool Present(HDC dc); |
| 61 bool CopyTo(const gfx::Rect& src_subrect, | 61 bool CopyTo(const gfx::Rect& src_subrect, |
| 62 const gfx::Size& dst_size, | 62 const gfx::Size& dst_size, |
| 63 void* buf); | 63 void* buf); |
| 64 void Invalidate(); | 64 void Invalidate(); |
| 65 | 65 |
| 66 #if defined(USE_AURA) |
| 67 // TODO(scottmg): This is a temporary hack until we have a two-worlds ash/aura |
| 68 // separation. |
| 69 void SetNewTargetWindow(gfx::PluginWindowHandle window); |
| 70 #endif |
| 71 |
| 66 private: | 72 private: |
| 67 friend class base::RefCountedThreadSafe<AcceleratedPresenter>; | 73 friend class base::RefCountedThreadSafe<AcceleratedPresenter>; |
| 68 | 74 |
| 69 ~AcceleratedPresenter(); | 75 ~AcceleratedPresenter(); |
| 70 | 76 |
| 71 // These member functions are called on the PresentThread with which the | 77 // These member functions are called on the PresentThread with which the |
| 72 // presenter has affinity. | 78 // presenter has affinity. |
| 73 void DoPresentAndAcknowledge( | 79 void DoPresentAndAcknowledge( |
| 74 const gfx::Size& size, | 80 const gfx::Size& size, |
| 75 int64 surface_handle, | 81 int64 surface_handle, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 147 |
| 142 // Indicates that the surface has become invisible. | 148 // Indicates that the surface has become invisible. |
| 143 void WasHidden(); | 149 void WasHidden(); |
| 144 | 150 |
| 145 private: | 151 private: |
| 146 const scoped_refptr<AcceleratedPresenter> presenter_; | 152 const scoped_refptr<AcceleratedPresenter> presenter_; |
| 147 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); | 153 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); |
| 148 }; | 154 }; |
| 149 | 155 |
| 150 #endif // UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 156 #endif // UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
| OLD | NEW |