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