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

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

Issue 640023004: cc: Make OutputSurface::SwapBuffers pure virtual (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@latinfo
Patch Set: rebase, comment, removed unused includes Created 6 years, 2 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/output/renderer_unittest.cc ('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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 virtual bool HasExternalStencilTest() const override; 113 virtual bool HasExternalStencilTest() const override;
114 114
115 void set_has_external_stencil_test(bool has_test) { 115 void set_has_external_stencil_test(bool has_test) {
116 has_external_stencil_test_ = has_test; 116 has_external_stencil_test_ = has_test;
117 } 117 }
118 118
119 void SetMemoryPolicyToSetAtBind( 119 void SetMemoryPolicyToSetAtBind(
120 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind); 120 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind);
121 121
122 gfx::Rect last_swap_rect() const {
123 return last_swap_rect_;
124 }
125
122 protected: 126 protected:
123 FakeOutputSurface( 127 FakeOutputSurface(
124 scoped_refptr<ContextProvider> context_provider, 128 scoped_refptr<ContextProvider> context_provider,
125 bool delegated_rendering); 129 bool delegated_rendering);
126 130
127 FakeOutputSurface( 131 FakeOutputSurface(
128 scoped_ptr<SoftwareOutputDevice> software_device, 132 scoped_ptr<SoftwareOutputDevice> software_device,
129 bool delegated_rendering); 133 bool delegated_rendering);
130 134
131 FakeOutputSurface( 135 FakeOutputSurface(
132 scoped_refptr<ContextProvider> context_provider, 136 scoped_refptr<ContextProvider> context_provider,
133 scoped_ptr<SoftwareOutputDevice> software_device, 137 scoped_ptr<SoftwareOutputDevice> software_device,
134 bool delegated_rendering); 138 bool delegated_rendering);
135 139
136 void OnBeginFrame(); 140 void OnBeginFrame();
137 141
138 OutputSurfaceClient* client_; 142 OutputSurfaceClient* client_;
139 CompositorFrame last_sent_frame_; 143 CompositorFrame last_sent_frame_;
140 size_t num_sent_frames_; 144 size_t num_sent_frames_;
141 bool needs_begin_frame_; 145 bool needs_begin_frame_;
142 bool has_external_stencil_test_; 146 bool has_external_stencil_test_;
143 TransferableResourceArray resources_held_by_parent_; 147 TransferableResourceArray resources_held_by_parent_;
144 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; 148 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_;
149 gfx::Rect last_swap_rect_;
145 150
146 base::WeakPtrFactory<FakeOutputSurface> fake_weak_ptr_factory_; 151 base::WeakPtrFactory<FakeOutputSurface> fake_weak_ptr_factory_;
147 }; 152 };
148 153
149 } // namespace cc 154 } // namespace cc
150 155
151 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ 156 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/output/renderer_unittest.cc ('k') | cc/test/fake_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698