Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: cc/output/output_surface.h

Issue 53633003: Do not give GPU memory to backgrounded compositors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove test Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/output/managed_memory_policy.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // virtual for testing. 192 // virtual for testing.
193 virtual base::TimeTicks RetroactiveBeginImplFrameDeadline(); 193 virtual base::TimeTicks RetroactiveBeginImplFrameDeadline();
194 virtual void PostCheckForRetroactiveBeginImplFrame(); 194 virtual void PostCheckForRetroactiveBeginImplFrame();
195 void CheckForRetroactiveBeginImplFrame(); 195 void CheckForRetroactiveBeginImplFrame();
196 196
197 private: 197 private:
198 OutputSurfaceClient* client_; 198 OutputSurfaceClient* client_;
199 199
200 void SetUpContext3d(); 200 void SetUpContext3d();
201 void ResetContext3d(); 201 void ResetContext3d();
202 void SetMemoryPolicy(const ManagedMemoryPolicy& policy, 202 void SetMemoryPolicy(const ManagedMemoryPolicy& policy);
203 bool discard_backbuffer_when_not_visible);
204 void UpdateAndMeasureGpuLatency(); 203 void UpdateAndMeasureGpuLatency();
205 204
206 // check_for_retroactive_begin_impl_frame_pending_ is used to avoid posting 205 // check_for_retroactive_begin_impl_frame_pending_ is used to avoid posting
207 // redundant checks for a retroactive BeginImplFrame. 206 // redundant checks for a retroactive BeginImplFrame.
208 bool check_for_retroactive_begin_impl_frame_pending_; 207 bool check_for_retroactive_begin_impl_frame_pending_;
209 208
210 bool external_stencil_test_enabled_; 209 bool external_stencil_test_enabled_;
211 210
212 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; 211 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
213 212
214 std::deque<unsigned> available_gpu_latency_query_ids_; 213 std::deque<unsigned> available_gpu_latency_query_ids_;
215 std::deque<unsigned> pending_gpu_latency_query_ids_; 214 std::deque<unsigned> pending_gpu_latency_query_ids_;
216 RollingTimeDeltaHistory gpu_latency_history_; 215 RollingTimeDeltaHistory gpu_latency_history_;
217 216
218 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 217 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
219 }; 218 };
220 219
221 } // namespace cc 220 } // namespace cc
222 221
223 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 222 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/output/managed_memory_policy.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698