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

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

Issue 266743003: Add flag to enable rendering of text using signed distance fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix uses of ResourceProvider::Create() outside of Chrome proper. Created 6 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
« no previous file with comments | « cc/resources/video_resource_updater_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('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/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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { 104 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) {
105 enable_pixel_output_.reset(new gfx::DisableNullDrawGLBindings); 105 enable_pixel_output_.reset(new gfx::DisableNullDrawGLBindings);
106 106
107 output_surface_.reset( 107 output_surface_.reset(
108 new PixelTestOutputSurface(new TestInProcessContextProvider)); 108 new PixelTestOutputSurface(new TestInProcessContextProvider));
109 output_surface_->BindToClient(output_surface_client_.get()); 109 output_surface_->BindToClient(output_surface_client_.get());
110 110
111 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 111 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
112 resource_provider_ = ResourceProvider::Create( 112 resource_provider_ = ResourceProvider::Create(
113 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1); 113 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, false);
114 114
115 texture_mailbox_deleter_ = make_scoped_ptr( 115 texture_mailbox_deleter_ = make_scoped_ptr(
116 new TextureMailboxDeleter(base::MessageLoopProxy::current())); 116 new TextureMailboxDeleter(base::MessageLoopProxy::current()));
117 117
118 renderer_ = GLRenderer::Create(this, 118 renderer_ = GLRenderer::Create(this,
119 &settings_, 119 &settings_,
120 output_surface_.get(), 120 output_surface_.get(),
121 resource_provider_.get(), 121 resource_provider_.get(),
122 texture_mailbox_deleter_.get(), 122 texture_mailbox_deleter_.get(),
123 0).PassAs<DirectRenderer>(); 123 0).PassAs<DirectRenderer>();
(...skipping 21 matching lines...) Expand all
145 static_cast<PixelTestOutputSurface*>(output_surface_.get()) 145 static_cast<PixelTestOutputSurface*>(output_surface_.get())
146 ->set_has_external_stencil_test(true); 146 ->set_has_external_stencil_test(true);
147 } 147 }
148 148
149 void PixelTest::SetUpSoftwareRenderer() { 149 void PixelTest::SetUpSoftwareRenderer() {
150 scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice()); 150 scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice());
151 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); 151 output_surface_.reset(new PixelTestOutputSurface(device.Pass()));
152 output_surface_->BindToClient(output_surface_client_.get()); 152 output_surface_->BindToClient(output_surface_client_.get());
153 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 153 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
154 resource_provider_ = ResourceProvider::Create( 154 resource_provider_ = ResourceProvider::Create(
155 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1); 155 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, false);
156 renderer_ = 156 renderer_ =
157 SoftwareRenderer::Create( 157 SoftwareRenderer::Create(
158 this, &settings_, output_surface_.get(), resource_provider_.get()) 158 this, &settings_, output_surface_.get(), resource_provider_.get())
159 .PassAs<DirectRenderer>(); 159 .PassAs<DirectRenderer>();
160 } 160 }
161 161
162 } // namespace cc 162 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698