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

Side by Side Diff: cc/test/fake_output_surface.h

Issue 1435133004: cc: Clean up max frames/swaps pending usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « cc/test/fake_layer_tree_host_impl_client.h ('k') | cc/test/fake_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_TEST_FAKE_OUTPUT_SURFACE_H_ 5 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_
6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_ 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 static scoped_ptr<FakeOutputSurface> CreateOffscreen( 89 static scoped_ptr<FakeOutputSurface> CreateOffscreen(
90 scoped_ptr<TestWebGraphicsContext3D> context) { 90 scoped_ptr<TestWebGraphicsContext3D> context) {
91 scoped_ptr<FakeOutputSurface> surface(new FakeOutputSurface( 91 scoped_ptr<FakeOutputSurface> surface(new FakeOutputSurface(
92 TestContextProvider::Create(context.Pass()), false)); 92 TestContextProvider::Create(context.Pass()), false));
93 surface->capabilities_.uses_default_gl_framebuffer = false; 93 surface->capabilities_.uses_default_gl_framebuffer = false;
94 return surface.Pass(); 94 return surface.Pass();
95 } 95 }
96 96
97 void set_max_frames_pending(int max) {
98 capabilities_.max_frames_pending = max;
99 }
100
97 CompositorFrame& last_sent_frame() { return last_sent_frame_; } 101 CompositorFrame& last_sent_frame() { return last_sent_frame_; }
98 size_t num_sent_frames() { return num_sent_frames_; } 102 size_t num_sent_frames() { return num_sent_frames_; }
99 103
100 void SwapBuffers(CompositorFrame* frame) override; 104 void SwapBuffers(CompositorFrame* frame) override;
101 105
102 OutputSurfaceClient* client() { return client_; } 106 OutputSurfaceClient* client() { return client_; }
103 bool BindToClient(OutputSurfaceClient* client) override; 107 bool BindToClient(OutputSurfaceClient* client) override;
104 108
105 void set_framebuffer(unsigned framebuffer) { framebuffer_ = framebuffer; } 109 void set_framebuffer(unsigned framebuffer) { framebuffer_ = framebuffer; }
106 void BindFramebuffer() override; 110 void BindFramebuffer() override;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 unsigned framebuffer_; 166 unsigned framebuffer_;
163 TransferableResourceArray resources_held_by_parent_; 167 TransferableResourceArray resources_held_by_parent_;
164 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; 168 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_;
165 OverlayCandidateValidator* overlay_candidate_validator_; 169 OverlayCandidateValidator* overlay_candidate_validator_;
166 gfx::Rect last_swap_rect_; 170 gfx::Rect last_swap_rect_;
167 }; 171 };
168 172
169 } // namespace cc 173 } // namespace cc
170 174
171 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ 175 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl_client.h ('k') | cc/test/fake_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698