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 CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 void SetLatencyInfo( | 193 void SetLatencyInfo( |
194 const std::vector<ui::LatencyInfo>& latency_info) override; | 194 const std::vector<ui::LatencyInfo>& latency_info) override; |
195 void WakeUpGpu() override; | 195 void WakeUpGpu() override; |
196 | 196 |
197 protected: | 197 protected: |
198 ~PassThroughImageTransportSurface() override; | 198 ~PassThroughImageTransportSurface() override; |
199 | 199 |
200 // If updated vsync parameters can be determined, send this information to | 200 // If updated vsync parameters can be determined, send this information to |
201 // the browser. | 201 // the browser. |
202 virtual void SendVSyncUpdateIfAvailable(); | 202 virtual void SendVSyncUpdateIfAvailable(); |
| 203 void SwapBuffersCallBack(); |
203 | 204 |
204 ImageTransportHelper* GetHelper() { return helper_.get(); } | 205 ImageTransportHelper* GetHelper() { return helper_.get(); } |
205 | 206 |
206 private: | 207 private: |
207 scoped_ptr<ImageTransportHelper> helper_; | 208 scoped_ptr<ImageTransportHelper> helper_; |
208 bool did_set_swap_interval_; | 209 bool did_set_swap_interval_; |
209 std::vector<ui::LatencyInfo> latency_info_; | 210 std::vector<ui::LatencyInfo> latency_info_; |
| 211 base::WeakPtrFactory<PassThroughImageTransportSurface> weak_ptr_factory_; |
210 | 212 |
211 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); | 213 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); |
212 }; | 214 }; |
213 | 215 |
214 } // namespace content | 216 } // namespace content |
215 | 217 |
216 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 218 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
OLD | NEW |