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

Unified Diff: cc/resources/scoped_resource_unittest.cc

Issue 202763002: Switch to use SharedBitmapManager all the time in cc_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/resource_update_controller_unittest.cc ('k') | cc/resources/shared_bitmap_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/scoped_resource_unittest.cc
diff --git a/cc/resources/scoped_resource_unittest.cc b/cc/resources/scoped_resource_unittest.cc
index 93ad3208b83b08bf44c82ed32eb0847505692f56..8c97d8e46dbaeafcc861cf502ffa9b849afb4491 100644
--- a/cc/resources/scoped_resource_unittest.cc
+++ b/cc/resources/scoped_resource_unittest.cc
@@ -7,6 +7,7 @@
#include "cc/output/renderer.h"
#include "cc/test/fake_output_surface.h"
#include "cc/test/fake_output_surface_client.h"
+#include "cc/test/test_shared_bitmap_manager.h"
#include "cc/test/tiled_layer_test_common.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -18,8 +19,10 @@ TEST(ScopedResourceTest, NewScopedResource) {
scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
CHECK(output_surface->BindToClient(&output_surface_client));
- scoped_ptr<ResourceProvider> resource_provider(
- ResourceProvider::Create(output_surface.get(), NULL, 0, false, 1));
+ scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+ new TestSharedBitmapManager());
+ scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+ output_surface.get(), shared_bitmap_manager.get(), 0, false, 1));
scoped_ptr<ScopedResource> texture =
ScopedResource::Create(resource_provider.get());
@@ -36,8 +39,10 @@ TEST(ScopedResourceTest, CreateScopedResource) {
scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
CHECK(output_surface->BindToClient(&output_surface_client));
- scoped_ptr<ResourceProvider> resource_provider(
- ResourceProvider::Create(output_surface.get(), NULL, 0, false, 1));
+ scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+ new TestSharedBitmapManager());
+ scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+ output_surface.get(), shared_bitmap_manager.get(), 0, false, 1));
scoped_ptr<ScopedResource> texture =
ScopedResource::Create(resource_provider.get());
texture->Allocate(gfx::Size(30, 30),
@@ -58,8 +63,10 @@ TEST(ScopedResourceTest, ScopedResourceIsDeleted) {
scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
CHECK(output_surface->BindToClient(&output_surface_client));
- scoped_ptr<ResourceProvider> resource_provider(
- ResourceProvider::Create(output_surface.get(), NULL, 0, false, 1));
+ scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+ new TestSharedBitmapManager());
+ scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+ output_surface.get(), shared_bitmap_manager.get(), 0, false, 1));
{
scoped_ptr<ScopedResource> texture =
ScopedResource::Create(resource_provider.get());
@@ -92,8 +99,10 @@ TEST(ScopedResourceTest, LeakScopedResource) {
scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d());
CHECK(output_surface->BindToClient(&output_surface_client));
- scoped_ptr<ResourceProvider> resource_provider(
- ResourceProvider::Create(output_surface.get(), NULL, 0, false, 1));
+ scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
+ new TestSharedBitmapManager());
+ scoped_ptr<ResourceProvider> resource_provider(ResourceProvider::Create(
+ output_surface.get(), shared_bitmap_manager.get(), 0, false, 1));
{
scoped_ptr<ScopedResource> texture =
ScopedResource::Create(resource_provider.get());
« no previous file with comments | « cc/resources/resource_update_controller_unittest.cc ('k') | cc/resources/shared_bitmap_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698