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

Side by Side Diff: cc/software_renderer_unittest.cc

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor input event changes Created 8 years 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
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/software_renderer.h" 5 #include "cc/software_renderer.h"
6 6
7 #include "cc/quad_sink.h" 7 #include "cc/quad_sink.h"
8 #include "cc/render_pass.h" 8 #include "cc/render_pass.h"
9 #include "cc/render_pass_draw_quad.h" 9 #include "cc/render_pass_draw_quad.h"
10 #include "cc/solid_color_draw_quad.h" 10 #include "cc/solid_color_draw_quad.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // RendererClient implementation. 40 // RendererClient implementation.
41 virtual const gfx::Size& deviceViewportSize() const OVERRIDE { return m_view portSize; } 41 virtual const gfx::Size& deviceViewportSize() const OVERRIDE { return m_view portSize; }
42 virtual const LayerTreeSettings& settings() const OVERRIDE { return m_settin gs; } 42 virtual const LayerTreeSettings& settings() const OVERRIDE { return m_settin gs; }
43 virtual void didLoseOutputSurface() OVERRIDE { } 43 virtual void didLoseOutputSurface() OVERRIDE { }
44 virtual void onSwapBuffersComplete() OVERRIDE { } 44 virtual void onSwapBuffersComplete() OVERRIDE { }
45 virtual void setFullRootLayerDamage() OVERRIDE { } 45 virtual void setFullRootLayerDamage() OVERRIDE { }
46 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR IDE { }; 46 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR IDE { };
47 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O VERRIDE { }; 47 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O VERRIDE { };
48 virtual bool hasImplThread() const OVERRIDE { return false; } 48 virtual bool hasImplThread() const OVERRIDE { return false; }
49 virtual void onReceivedLatencyInfo(const WebKit::WebLatencyInfoImpl&) OVERRI DE { }
49 50
50 protected: 51 protected:
51 scoped_ptr<FakeOutputSurface> m_outputSurface; 52 scoped_ptr<FakeOutputSurface> m_outputSurface;
52 scoped_ptr<ResourceProvider> m_resourceProvider; 53 scoped_ptr<ResourceProvider> m_resourceProvider;
53 scoped_ptr<SoftwareRenderer> m_renderer; 54 scoped_ptr<SoftwareRenderer> m_renderer;
54 gfx::Size m_viewportSize; 55 gfx::Size m_viewportSize;
55 LayerTreeSettings m_settings; 56 LayerTreeSettings m_settings;
56 }; 57 };
57 58
58 TEST_F(SoftwareRendererTest, solidColorQuad) 59 TEST_F(SoftwareRendererTest, solidColorQuad)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 renderer()->getFramebufferPixels(pixels.get(), outerRect); 150 renderer()->getFramebufferPixels(pixels.get(), outerRect);
150 151
151 EXPECT_EQ(SK_ColorYELLOW, pixels[0]); 152 EXPECT_EQ(SK_ColorYELLOW, pixels[0]);
152 EXPECT_EQ(SK_ColorYELLOW, pixels[outerPixels - 1]); 153 EXPECT_EQ(SK_ColorYELLOW, pixels[outerPixels - 1]);
153 EXPECT_EQ(SK_ColorCYAN, pixels[outerSize.width() + 1]); 154 EXPECT_EQ(SK_ColorCYAN, pixels[outerSize.width() + 1]);
154 EXPECT_EQ(SK_ColorCYAN, pixels[outerPixels - outerSize.width() - 2]); 155 EXPECT_EQ(SK_ColorCYAN, pixels[outerPixels - outerSize.width() - 2]);
155 } 156 }
156 157
157 } // namespace 158 } // namespace
158 } // namespace cc 159 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698