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

Side by Side Diff: cc/test/pixel_test.cc

Issue 15688002: Part 1/3 (compositor) of adding with device scale factor to transport surfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Android build Created 7 years, 7 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_unittest.cc ('k') | cc/test/test_web_graphics_context_3d.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 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
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
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
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/test/test_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698