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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "cc/base/switches.h" | 10 #include "cc/base/switches.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter); | 130 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter); |
131 | 131 |
132 renderer_ = GLRenderer::Create(this, | 132 renderer_ = GLRenderer::Create(this, |
133 &settings_, | 133 &settings_, |
134 output_surface_.get(), | 134 output_surface_.get(), |
135 resource_provider_.get(), | 135 resource_provider_.get(), |
136 texture_mailbox_deleter_.get(), | 136 texture_mailbox_deleter_.get(), |
137 0).PassAs<DirectRenderer>(); | 137 0).PassAs<DirectRenderer>(); |
138 } | 138 } |
139 | 139 |
140 void PixelTest::ForceExpandedViewport(gfx::Size surface_expansion) { | 140 void PixelTest::ForceExpandedViewport(const gfx::Size& surface_expansion) { |
141 static_cast<PixelTestOutputSurface*>(output_surface_.get()) | 141 static_cast<PixelTestOutputSurface*>(output_surface_.get()) |
142 ->set_surface_expansion_size(surface_expansion); | 142 ->set_surface_expansion_size(surface_expansion); |
143 SoftwareOutputDevice* device = output_surface_->software_device(); | 143 SoftwareOutputDevice* device = output_surface_->software_device(); |
144 if (device) { | 144 if (device) { |
145 static_cast<PixelTestSoftwareOutputDevice*>(device) | 145 static_cast<PixelTestSoftwareOutputDevice*>(device) |
146 ->set_surface_expansion_size(surface_expansion); | 146 ->set_surface_expansion_size(surface_expansion); |
147 } | 147 } |
148 } | 148 } |
149 | 149 |
150 void PixelTest::ForceViewportOffset(gfx::Vector2d viewport_offset) { | 150 void PixelTest::ForceViewportOffset(gfx::Vector2d viewport_offset) { |
(...skipping 14 matching lines...) Expand all Loading... |
165 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); | 165 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); |
166 output_surface_->BindToClient(output_surface_client_.get()); | 166 output_surface_->BindToClient(output_surface_client_.get()); |
167 resource_provider_ = | 167 resource_provider_ = |
168 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); | 168 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); |
169 renderer_ = SoftwareRenderer::Create( | 169 renderer_ = SoftwareRenderer::Create( |
170 this, &settings_, output_surface_.get(), resource_provider_.get()) | 170 this, &settings_, output_surface_.get(), resource_provider_.get()) |
171 .PassAs<DirectRenderer>(); | 171 .PassAs<DirectRenderer>(); |
172 } | 172 } |
173 | 173 |
174 } // namespace cc | 174 } // namespace cc |
OLD | NEW |