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

Side by Side Diff: cc/output/software_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/software_renderer.cc ('k') | cc/test/fake_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/software_renderer.h" 5 #include "cc/output/software_renderer.h"
6 6
7 #include "cc/layers/quad_sink.h" 7 #include "cc/layers/quad_sink.h"
8 #include "cc/output/compositor_frame_metadata.h" 8 #include "cc/output/compositor_frame_metadata.h"
9 #include "cc/output/software_output_device.h" 9 #include "cc/output/software_output_device.h"
10 #include "cc/quads/render_pass.h" 10 #include "cc/quads/render_pass.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 should_clear_root_render_pass_ = clear_root_render_pass; 48 should_clear_root_render_pass_ = clear_root_render_pass;
49 } 49 }
50 50
51 // RendererClient implementation. 51 // RendererClient implementation.
52 virtual gfx::Size DeviceViewportSize() const OVERRIDE { 52 virtual gfx::Size DeviceViewportSize() const OVERRIDE {
53 return viewport_size_; 53 return viewport_size_;
54 } 54 }
55 virtual const LayerTreeSettings& Settings() const OVERRIDE { 55 virtual const LayerTreeSettings& Settings() const OVERRIDE {
56 return settings_; 56 return settings_;
57 } 57 }
58 virtual void DidLoseOutputSurface() OVERRIDE {}
59 virtual void OnSwapBuffersComplete() OVERRIDE {}
60 virtual void SetFullRootLayerDamage() OVERRIDE {} 58 virtual void SetFullRootLayerDamage() OVERRIDE {}
61 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) 59 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
62 OVERRIDE {} 60 OVERRIDE {}
63 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) 61 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
64 OVERRIDE {} 62 OVERRIDE {}
65 virtual bool HasImplThread() const OVERRIDE { return false; } 63 virtual bool HasImplThread() const OVERRIDE { return false; }
66 virtual bool ShouldClearRootRenderPass() const OVERRIDE { 64 virtual bool ShouldClearRootRenderPass() const OVERRIDE {
67 return should_clear_root_render_pass_; 65 return should_clear_root_render_pass_;
68 } 66 }
69 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE { 67 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 EXPECT_EQ( 251 EXPECT_EQ(
254 SK_ColorMAGENTA, 252 SK_ColorMAGENTA,
255 pixels[smaller_rect.y() * viewport_rect.width() + smaller_rect.x()]); 253 pixels[smaller_rect.y() * viewport_rect.width() + smaller_rect.x()]);
256 EXPECT_EQ(SK_ColorMAGENTA, 254 EXPECT_EQ(SK_ColorMAGENTA,
257 pixels[(smaller_rect.bottom() - 1) * viewport_rect.width() + 255 pixels[(smaller_rect.bottom() - 1) * viewport_rect.width() +
258 smaller_rect.right() - 1]); 256 smaller_rect.right() - 1]);
259 } 257 }
260 258
261 } // namespace 259 } // namespace
262 } // namespace cc 260 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/test/fake_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698