| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_OUTPUT_OUTPUT_SURFACE_H_ | 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_ |
| 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ | 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 base::TimeDelta GpuLatencyEstimate(); | 140 base::TimeDelta GpuLatencyEstimate(); |
| 141 | 141 |
| 142 // Get the class capable of informing cc of hardware overlay capability. | 142 // Get the class capable of informing cc of hardware overlay capability. |
| 143 OverlayCandidateValidator* overlay_candidate_validator() const { | 143 OverlayCandidateValidator* overlay_candidate_validator() const { |
| 144 return overlay_candidate_validator_.get(); | 144 return overlay_candidate_validator_.get(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 protected: | 147 protected: |
| 148 // Synchronously initialize context3d and enter hardware mode. | 148 // Synchronously initialize context3d and enter hardware mode. |
| 149 // This can only supported in threaded compositing mode. | 149 // This can only supported in threaded compositing mode. |
| 150 // |offscreen_context_provider| should match what is returned by | |
| 151 // LayerTreeClient::OffscreenContextProvider(). | |
| 152 bool InitializeAndSetContext3d( | 150 bool InitializeAndSetContext3d( |
| 153 scoped_refptr<ContextProvider> context_provider, | 151 scoped_refptr<ContextProvider> context_provider); |
| 154 scoped_refptr<ContextProvider> offscreen_context_provider); | |
| 155 void ReleaseGL(); | 152 void ReleaseGL(); |
| 156 | 153 |
| 157 void PostSwapBuffersComplete(); | 154 void PostSwapBuffersComplete(); |
| 158 | 155 |
| 159 struct OutputSurface::Capabilities capabilities_; | 156 struct OutputSurface::Capabilities capabilities_; |
| 160 scoped_refptr<ContextProvider> context_provider_; | 157 scoped_refptr<ContextProvider> context_provider_; |
| 161 scoped_ptr<SoftwareOutputDevice> software_device_; | 158 scoped_ptr<SoftwareOutputDevice> software_device_; |
| 162 scoped_ptr<OverlayCandidateValidator> overlay_candidate_validator_; | 159 scoped_ptr<OverlayCandidateValidator> overlay_candidate_validator_; |
| 163 gfx::Size surface_size_; | 160 gfx::Size surface_size_; |
| 164 float device_scale_factor_; | 161 float device_scale_factor_; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 std::deque<unsigned> available_gpu_latency_query_ids_; | 214 std::deque<unsigned> available_gpu_latency_query_ids_; |
| 218 std::deque<unsigned> pending_gpu_latency_query_ids_; | 215 std::deque<unsigned> pending_gpu_latency_query_ids_; |
| 219 RollingTimeDeltaHistory gpu_latency_history_; | 216 RollingTimeDeltaHistory gpu_latency_history_; |
| 220 | 217 |
| 221 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 218 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 222 }; | 219 }; |
| 223 | 220 |
| 224 } // namespace cc | 221 } // namespace cc |
| 225 | 222 |
| 226 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 223 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |