diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-20 17:25:45 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-20 17:25:45 +0000 |
commit | 4e2eb35838d42017542959dbef29d84ca6d2bbc4 (patch) | |
tree | 7eabd0b457f008c43398e158cabdd616d9cf7a61 /cc/test/pixel_test.cc | |
parent | 22e548845b1548ebad28c9d68ad075bce949ec57 (diff) | |
download | chromium_src-4e2eb35838d42017542959dbef29d84ca6d2bbc4.zip chromium_src-4e2eb35838d42017542959dbef29d84ca6d2bbc4.tar.gz chromium_src-4e2eb35838d42017542959dbef29d84ca6d2bbc4.tar.bz2 |
Switch to use SharedBitmapManager all the time in cc_unittests
This matches the behavior of the browser and renderer better, and lets us use SharedBitmaps in more tests.
Review URL: https://codereview.chromium.org/202763002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258318 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/pixel_test.cc')
-rw-r--r-- | cc/test/pixel_test.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc index 782a144..112d391 100644 --- a/cc/test/pixel_test.cc +++ b/cc/test/pixel_test.cc @@ -23,6 +23,7 @@ #include "cc/test/pixel_test_software_output_device.h" #include "cc/test/pixel_test_utils.h" #include "cc/test/test_in_process_context_provider.h" +#include "cc/test/test_shared_bitmap_manager.h" #include "testing/gtest/include/gtest/gtest.h" namespace cc { @@ -121,8 +122,9 @@ void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { new PixelTestOutputSurface(new TestInProcessContextProvider)); output_surface_->BindToClient(output_surface_client_.get()); - resource_provider_ = - ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); + shared_bitmap_manager_.reset(new TestSharedBitmapManager()); + resource_provider_ = ResourceProvider::Create( + output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1); texture_mailbox_deleter_ = make_scoped_ptr( new TextureMailboxDeleter(base::MessageLoopProxy::current())); @@ -162,11 +164,13 @@ void PixelTest::SetUpSoftwareRenderer() { scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice()); output_surface_.reset(new PixelTestOutputSurface(device.Pass())); output_surface_->BindToClient(output_surface_client_.get()); - resource_provider_ = - ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); - renderer_ = SoftwareRenderer::Create( - this, &settings_, output_surface_.get(), resource_provider_.get()) - .PassAs<DirectRenderer>(); + shared_bitmap_manager_.reset(new TestSharedBitmapManager()); + resource_provider_ = ResourceProvider::Create( + output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1); + renderer_ = + SoftwareRenderer::Create( + this, &settings_, output_surface_.get(), resource_provider_.get()) + .PassAs<DirectRenderer>(); } } // namespace cc |