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

Side by Side Diff: cc/output/gl_renderer_unittest.cc

Issue 12545018: Move context-related callbacks into OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit test Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/output_surface.h » ('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 #include "cc/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include "cc/output/compositor_frame_metadata.h" 7 #include "cc/output/compositor_frame_metadata.h"
8 #include "cc/resources/prioritized_resource_manager.h" 8 #include "cc/resources/prioritized_resource_manager.h"
9 #include "cc/resources/resource_provider.h" 9 #include "cc/resources/resource_provider.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 // RendererClient methods. 159 // RendererClient methods.
160 virtual gfx::Size DeviceViewportSize() const OVERRIDE { 160 virtual gfx::Size DeviceViewportSize() const OVERRIDE {
161 static gfx::Size fake_size(1, 1); 161 static gfx::Size fake_size(1, 1);
162 return fake_size; 162 return fake_size;
163 } 163 }
164 virtual const LayerTreeSettings& Settings() const OVERRIDE { 164 virtual const LayerTreeSettings& Settings() const OVERRIDE {
165 static LayerTreeSettings fake_settings; 165 static LayerTreeSettings fake_settings;
166 return fake_settings; 166 return fake_settings;
167 } 167 }
168 virtual void DidLoseOutputSurface() OVERRIDE {}
169 virtual void OnSwapBuffersComplete() OVERRIDE {}
170 virtual void SetFullRootLayerDamage() OVERRIDE { 168 virtual void SetFullRootLayerDamage() OVERRIDE {
171 set_full_root_layer_damage_count_++; 169 set_full_root_layer_damage_count_++;
172 } 170 }
173 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) 171 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
174 OVERRIDE { 172 OVERRIDE {
175 memory_allocation_limit_bytes_ = policy.bytes_limit_when_visible; 173 memory_allocation_limit_bytes_ = policy.bytes_limit_when_visible;
176 } 174 }
177 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) 175 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
178 OVERRIDE { 176 OVERRIDE {
179 if (last_call_was_set_visibility_) 177 if (last_call_was_set_visibility_)
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 } 1365 }
1368 }; 1366 };
1369 1367
1370 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) { 1368 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) {
1371 EXPECT_CALL(output_surface_, SendFrameToParentCompositor(_)).Times(1); 1369 EXPECT_CALL(output_surface_, SendFrameToParentCompositor(_)).Times(1);
1372 DrawFrame(); 1370 DrawFrame();
1373 } 1371 }
1374 1372
1375 } // namespace 1373 } // namespace
1376 } // namespace cc 1374 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698