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

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

Issue 218633010: cc: Handle retroactive BeginFrames in the Scheduler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@compositorVsyncDisable
Patch Set: fix comment typo Created 6 years, 8 months 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 TestContextProvider::Create(context.Pass()), false)); 87 TestContextProvider::Create(context.Pass()), false));
88 surface->capabilities_.uses_default_gl_framebuffer = false; 88 surface->capabilities_.uses_default_gl_framebuffer = false;
89 return surface.Pass(); 89 return surface.Pass();
90 } 90 }
91 91
92 CompositorFrame& last_sent_frame() { return last_sent_frame_; } 92 CompositorFrame& last_sent_frame() { return last_sent_frame_; }
93 size_t num_sent_frames() { return num_sent_frames_; } 93 size_t num_sent_frames() { return num_sent_frames_; }
94 94
95 virtual void SwapBuffers(CompositorFrame* frame) OVERRIDE; 95 virtual void SwapBuffers(CompositorFrame* frame) OVERRIDE;
96 96
97 virtual void SetNeedsBeginImplFrame(bool enable) OVERRIDE; 97 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE;
98 bool needs_begin_impl_frame() const { 98 bool needs_begin_frame() const { return needs_begin_frame_; }
99 return needs_begin_impl_frame_;
100 }
101 99
102 void set_forced_draw_to_software_device(bool forced) { 100 void set_forced_draw_to_software_device(bool forced) {
103 forced_draw_to_software_device_ = forced; 101 forced_draw_to_software_device_ = forced;
104 } 102 }
105 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; 103 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE;
106 104
107 virtual bool BindToClient(OutputSurfaceClient* client) OVERRIDE; 105 virtual bool BindToClient(OutputSurfaceClient* client) OVERRIDE;
108 106
109 using OutputSurface::ReleaseGL; 107 using OutputSurface::ReleaseGL;
110 using OutputSurface::InitializeAndSetContext3d; 108 using OutputSurface::InitializeAndSetContext3d;
(...skipping 22 matching lines...) Expand all
133 131
134 FakeOutputSurface( 132 FakeOutputSurface(
135 scoped_ptr<SoftwareOutputDevice> software_device, 133 scoped_ptr<SoftwareOutputDevice> software_device,
136 bool delegated_rendering); 134 bool delegated_rendering);
137 135
138 FakeOutputSurface( 136 FakeOutputSurface(
139 scoped_refptr<ContextProvider> context_provider, 137 scoped_refptr<ContextProvider> context_provider,
140 scoped_ptr<SoftwareOutputDevice> software_device, 138 scoped_ptr<SoftwareOutputDevice> software_device,
141 bool delegated_rendering); 139 bool delegated_rendering);
142 140
143 void OnBeginImplFrame(); 141 void OnBeginFrame();
144 142
145 OutputSurfaceClient* client_; 143 OutputSurfaceClient* client_;
146 CompositorFrame last_sent_frame_; 144 CompositorFrame last_sent_frame_;
147 size_t num_sent_frames_; 145 size_t num_sent_frames_;
148 bool needs_begin_impl_frame_; 146 bool needs_begin_frame_;
149 bool forced_draw_to_software_device_; 147 bool forced_draw_to_software_device_;
150 bool has_external_stencil_test_; 148 bool has_external_stencil_test_;
151 TransferableResourceArray resources_held_by_parent_; 149 TransferableResourceArray resources_held_by_parent_;
152 base::WeakPtrFactory<FakeOutputSurface> fake_weak_ptr_factory_; 150 base::WeakPtrFactory<FakeOutputSurface> fake_weak_ptr_factory_;
153 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; 151 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_;
154 }; 152 };
155 153
156 } // namespace cc 154 } // namespace cc
157 155
158 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ 156 #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