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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 143803004: android: Migrate old content readback to use async readback (and delegated renderer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: consistent device scaling Created 6 years, 10 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/ui_resource_bitmap.cc ('k') | content/browser/android/content_startup_flags.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 f99bb73bd5134a7cea85ff1bc9de02b920f6f3eb..91a2fd2590bb542b64a34cc9810245565e0c66bb 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -5453,12 +5453,16 @@ TEST_F(LayerTreeHostImplTest, CreateETC1UIResource) {
EXPECT_EQ(0u, context3d->NumTextures());
+ gfx::Size size(4, 4);
+ // SkImageInfo has no support for ETC1. The |info| below contains the right
+ // total pixel size for the bitmap but not the right height and width. The
+ // correct width/height are passed directly to UIResourceBitmap.
SkImageInfo info =
- SkImageInfo::Make(4, 4, kPMColor_SkColorType, kPremul_SkAlphaType);
+ SkImageInfo::Make(4, 2, kAlpha_8_SkColorType, kPremul_SkAlphaType);
skia::RefPtr<SkPixelRef> pixel_ref =
skia::AdoptRef(SkMallocPixelRef::NewAllocate(info, 0, 0));
pixel_ref->setImmutable();
- UIResourceBitmap bitmap(pixel_ref);
+ UIResourceBitmap bitmap(pixel_ref, size);
UIResourceId ui_resource_id = 1;
host_impl_->CreateUIResource(ui_resource_id, bitmap);
EXPECT_EQ(1u, context3d->NumTextures());
« no previous file with comments | « cc/resources/ui_resource_bitmap.cc ('k') | content/browser/android/content_startup_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698