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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 197883017: SkColorType instead of (deprecated) SkBitmap::Config (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments from #5 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/test/tiled_layer_test_common.cc ('k') | cc/trees/layer_tree_host_pixeltest_masks.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index bcbc6c38280551860dcb56604095d2da2cbd50db..37f2cd551c368aeed47343097219b9e62fc28553 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -3696,13 +3696,9 @@ TEST_F(LayerTreeHostImplViewportCoveredTest, ViewportCoveredOverhangBitmap) {
host_impl_->SetViewportSize(DipSizeToPixelSize(viewport_size_));
SetupActiveTreeLayers();
- SkBitmap skbitmap;
- skbitmap.setConfig(SkBitmap::kARGB_8888_Config, 2, 2);
- skbitmap.allocPixels();
- skbitmap.setImmutable();
-
// Specify an overhang bitmap to use.
- UIResourceBitmap ui_resource_bitmap(skbitmap);
+ bool is_opaque = false;
+ UIResourceBitmap ui_resource_bitmap(gfx::Size(2, 2), is_opaque);
ui_resource_bitmap.SetWrapMode(UIResourceBitmap::REPEAT);
UIResourceId ui_resource_id = 12345;
host_impl_->CreateUIResource(ui_resource_id, ui_resource_bitmap);
@@ -5632,13 +5628,9 @@ TEST_F(LayerTreeHostImplTest, UIResourceManagement) {
EXPECT_EQ(0u, context3d->NumTextures());
- SkBitmap skbitmap;
- skbitmap.setConfig(SkBitmap::kARGB_8888_Config, 1, 1);
- skbitmap.allocPixels();
- skbitmap.setImmutable();
-
UIResourceId ui_resource_id = 1;
- UIResourceBitmap bitmap(skbitmap);
+ bool is_opaque = false;
+ UIResourceBitmap bitmap(gfx::Size(1, 1), is_opaque);
host_impl_->CreateUIResource(ui_resource_id, bitmap);
EXPECT_EQ(1u, context3d->NumTextures());
ResourceProvider::ResourceId id1 =
« no previous file with comments | « cc/test/tiled_layer_test_common.cc ('k') | cc/trees/layer_tree_host_pixeltest_masks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698