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

Unified Diff: cc/layers/ui_resource_layer_unittest.cc

Issue 192373004: use SkColorType instead of (deprecated) SkBitmap::Config for copyTo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/layers/ui_resource_layer_impl_unittest.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/ui_resource_layer_unittest.cc
diff --git a/cc/layers/ui_resource_layer_unittest.cc b/cc/layers/ui_resource_layer_unittest.cc
index 1e0e1dea0a5a618e42cf7de83da5a9c5a692d85c..362c29c5088d23a875abaa8e4168fe2400a9e7a1 100644
--- a/cc/layers/ui_resource_layer_unittest.cc
+++ b/cc/layers/ui_resource_layer_unittest.cc
@@ -65,8 +65,7 @@ TEST_F(UIResourceLayerTest, SetBitmap) {
EXPECT_FALSE(test_layer->DrawsContent());
SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10);
- bitmap.allocPixels();
+ bitmap.allocN32Pixels(10, 10);
bitmap.setImmutable();
test_layer->SetBitmap(bitmap);
@@ -93,13 +92,8 @@ TEST_F(UIResourceLayerTest, SetUIResourceId) {
EXPECT_FALSE(test_layer->DrawsContent());
- SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10);
- bitmap.allocPixels();
- bitmap.setImmutable();
-
scoped_ptr<ScopedUIResource> resource = ScopedUIResource::Create(
- layer_tree_host_.get(), UIResourceBitmap(bitmap));
+ layer_tree_host_.get(), UIResourceBitmap(10, 10));
test_layer->SetUIResourceId(resource->id());
test_layer->Update(&queue, &occlusion_tracker);
« no previous file with comments | « cc/layers/ui_resource_layer_impl_unittest.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698