Chromium Code Reviews| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 // (namely Android WebView), this is called to determine whether the software | 98 // (namely Android WebView), this is called to determine whether the software |
| 99 // device should be used on the current frame. | 99 // device should be used on the current frame. |
| 100 virtual bool ForcedDrawToSoftwareDevice() const; | 100 virtual bool ForcedDrawToSoftwareDevice() const; |
| 101 | 101 |
| 102 // Called by the compositor on the compositor thread. This is a place where | 102 // Called by the compositor on the compositor thread. This is a place where |
| 103 // thread-specific data for the output surface can be initialized, since from | 103 // thread-specific data for the output surface can be initialized, since from |
| 104 // this point on the output surface will only be used on the compositor | 104 // this point on the output surface will only be used on the compositor |
| 105 // thread. | 105 // thread. |
| 106 virtual bool BindToClient(OutputSurfaceClient* client); | 106 virtual bool BindToClient(OutputSurfaceClient* client); |
| 107 | 107 |
| 108 // This is called by the compositor on the compositor thread inside ReleaseGL | |
| 109 // in order to release the ContextProvider. | |
|
danakj
2014/05/20 23:09:11
Mention only valid with deferred_gl?
boliu
2014/05/20 23:31:38
Done.
| |
| 110 void ReleaseContextProvider(); | |
| 111 | |
| 108 // Enable or disable vsync. | 112 // Enable or disable vsync. |
| 109 void SetThrottleFrameProduction(bool enable); | 113 void SetThrottleFrameProduction(bool enable); |
| 110 | 114 |
| 111 virtual void EnsureBackbuffer(); | 115 virtual void EnsureBackbuffer(); |
| 112 virtual void DiscardBackbuffer(); | 116 virtual void DiscardBackbuffer(); |
| 113 | 117 |
| 114 virtual void Reshape(const gfx::Size& size, float scale_factor); | 118 virtual void Reshape(const gfx::Size& size, float scale_factor); |
| 115 virtual gfx::Size SurfaceSize() const; | 119 virtual gfx::Size SurfaceSize() const; |
| 116 | 120 |
| 117 virtual void BindFramebuffer(); | 121 virtual void BindFramebuffer(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 186 std::deque<unsigned> available_gpu_latency_query_ids_; | 190 std::deque<unsigned> available_gpu_latency_query_ids_; |
| 187 std::deque<unsigned> pending_gpu_latency_query_ids_; | 191 std::deque<unsigned> pending_gpu_latency_query_ids_; |
| 188 RollingTimeDeltaHistory gpu_latency_history_; | 192 RollingTimeDeltaHistory gpu_latency_history_; |
| 189 | 193 |
| 190 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 194 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 191 }; | 195 }; |
| 192 | 196 |
| 193 } // namespace cc | 197 } // namespace cc |
| 194 | 198 |
| 195 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 199 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |