| 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/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 false); | 124 false); |
| 125 | 125 |
| 126 texture_mailbox_deleter_ = make_scoped_ptr( | 126 texture_mailbox_deleter_ = make_scoped_ptr( |
| 127 new TextureMailboxDeleter(base::MessageLoopProxy::current())); | 127 new TextureMailboxDeleter(base::MessageLoopProxy::current())); |
| 128 | 128 |
| 129 renderer_ = GLRenderer::Create(this, | 129 renderer_ = GLRenderer::Create(this, |
| 130 &settings_, | 130 &settings_, |
| 131 output_surface_.get(), | 131 output_surface_.get(), |
| 132 resource_provider_.get(), | 132 resource_provider_.get(), |
| 133 texture_mailbox_deleter_.get(), | 133 texture_mailbox_deleter_.get(), |
| 134 0).PassAs<DirectRenderer>(); | 134 0); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void PixelTest::ForceExpandedViewport(const gfx::Size& surface_expansion) { | 137 void PixelTest::ForceExpandedViewport(const gfx::Size& surface_expansion) { |
| 138 static_cast<PixelTestOutputSurface*>(output_surface_.get()) | 138 static_cast<PixelTestOutputSurface*>(output_surface_.get()) |
| 139 ->set_surface_expansion_size(surface_expansion); | 139 ->set_surface_expansion_size(surface_expansion); |
| 140 SoftwareOutputDevice* device = output_surface_->software_device(); | 140 SoftwareOutputDevice* device = output_surface_->software_device(); |
| 141 if (device) { | 141 if (device) { |
| 142 static_cast<PixelTestSoftwareOutputDevice*>(device) | 142 static_cast<PixelTestSoftwareOutputDevice*>(device) |
| 143 ->set_surface_expansion_size(surface_expansion); | 143 ->set_surface_expansion_size(surface_expansion); |
| 144 } | 144 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 162 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); | 162 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); |
| 163 output_surface_->BindToClient(output_surface_client_.get()); | 163 output_surface_->BindToClient(output_surface_client_.get()); |
| 164 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 164 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
| 165 resource_provider_ = ResourceProvider::Create(output_surface_.get(), | 165 resource_provider_ = ResourceProvider::Create(output_surface_.get(), |
| 166 shared_bitmap_manager_.get(), | 166 shared_bitmap_manager_.get(), |
| 167 main_thread_task_runner_.get(), | 167 main_thread_task_runner_.get(), |
| 168 0, | 168 0, |
| 169 false, | 169 false, |
| 170 1, | 170 1, |
| 171 false); | 171 false); |
| 172 renderer_ = | 172 renderer_ = SoftwareRenderer::Create( |
| 173 SoftwareRenderer::Create( | 173 this, &settings_, output_surface_.get(), resource_provider_.get()); |
| 174 this, &settings_, output_surface_.get(), resource_provider_.get()) | |
| 175 .PassAs<DirectRenderer>(); | |
| 176 } | 174 } |
| 177 | 175 |
| 178 } // namespace cc | 176 } // namespace cc |
| OLD | NEW |