OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/pixel_test.h" | 5 #include "cc/test/pixel_test.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "cc/output/compositor_frame_metadata.h" | 9 #include "cc/output/compositor_frame_metadata.h" |
10 #include "cc/output/gl_renderer.h" | 10 #include "cc/output/gl_renderer.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class PixelTest::PixelTestRendererClient : public RendererClient { | 23 class PixelTest::PixelTestRendererClient : public RendererClient { |
24 public: | 24 public: |
25 explicit PixelTestRendererClient(gfx::Size device_viewport_size) | 25 explicit PixelTestRendererClient(gfx::Size device_viewport_size) |
26 : device_viewport_size_(device_viewport_size) {} | 26 : device_viewport_size_(device_viewport_size) {} |
27 | 27 |
28 // RendererClient implementation. | 28 // RendererClient implementation. |
29 virtual gfx::Size DeviceViewportSize() const OVERRIDE { | 29 virtual gfx::Size DeviceViewportSize() const OVERRIDE { |
30 return device_viewport_size_; | 30 return device_viewport_size_; |
31 } | 31 } |
| 32 virtual float DeviceScaleFactor() const OVERRIDE { |
| 33 return 1.f; |
| 34 } |
32 virtual const LayerTreeSettings& Settings() const OVERRIDE { | 35 virtual const LayerTreeSettings& Settings() const OVERRIDE { |
33 return settings_; | 36 return settings_; |
34 } | 37 } |
35 virtual void SetFullRootLayerDamage() OVERRIDE {} | 38 virtual void SetFullRootLayerDamage() OVERRIDE {} |
36 virtual void SetManagedMemoryPolicy( | 39 virtual void SetManagedMemoryPolicy( |
37 const ManagedMemoryPolicy& policy) OVERRIDE {} | 40 const ManagedMemoryPolicy& policy) OVERRIDE {} |
38 virtual void EnforceManagedMemoryPolicy( | 41 virtual void EnforceManagedMemoryPolicy( |
39 const ManagedMemoryPolicy& policy) OVERRIDE {} | 42 const ManagedMemoryPolicy& policy) OVERRIDE {} |
40 virtual bool HasImplThread() const OVERRIDE { return false; } | 43 virtual bool HasImplThread() const OVERRIDE { return false; } |
41 virtual bool ShouldClearRootRenderPass() const OVERRIDE { return true; } | 44 virtual bool ShouldClearRootRenderPass() const OVERRIDE { return true; } |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 scoped_ptr<SoftwareOutputDevice> device(new SoftwareOutputDevice()); | 145 scoped_ptr<SoftwareOutputDevice> device(new SoftwareOutputDevice()); |
143 output_surface_.reset(new OutputSurface(device.Pass())); | 146 output_surface_.reset(new OutputSurface(device.Pass())); |
144 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); | 147 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); |
145 renderer_ = SoftwareRenderer::Create( | 148 renderer_ = SoftwareRenderer::Create( |
146 fake_client_.get(), | 149 fake_client_.get(), |
147 output_surface_.get(), | 150 output_surface_.get(), |
148 resource_provider_.get()).PassAs<DirectRenderer>(); | 151 resource_provider_.get()).PassAs<DirectRenderer>(); |
149 } | 152 } |
150 | 153 |
151 } // namespace cc | 154 } // namespace cc |
OLD | NEW |