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

Unified Diff: cc/resources/texture_uploader_unittest.cc

Issue 463663002: Support an ALPHA_8 UIResourceBitmap format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 6 years, 4 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
Index: cc/resources/texture_uploader_unittest.cc
diff --git a/cc/resources/texture_uploader_unittest.cc b/cc/resources/texture_uploader_unittest.cc
index 8390b28ceef66a464e714dce5ac5289b45bfe821..bf94065d88c9e3711bb4a7bce155b636185c3a25 100644
--- a/cc/resources/texture_uploader_unittest.cc
+++ b/cc/resources/texture_uploader_unittest.cc
@@ -217,6 +217,15 @@ TEST(TextureUploaderTest, UploadContentsTest) {
}
UploadTexture(uploader.get(), RGBA_8888, gfx::Size(41, 43), buffer);
+ // Upload a tightly packed 41x86 ALPHA texture.
+ memset(buffer, 0, sizeof(buffer));
+ for (int i = 0; i < 86; ++i) {
+ // Mark the beginning and end of each row, for the test.
+ buffer[i * 1 * 41] = 0x1;
+ buffer[(i + 1) * 41 - 1] = 0x2;
+ }
+ UploadTexture(uploader.get(), ALPHA_8, gfx::Size(41, 86), buffer);
+
// Upload a tightly packed 82x86 LUMINANCE texture.
memset(buffer, 0, sizeof(buffer));
for (int i = 0; i < 86; ++i) {

Powered by Google App Engine
This is Rietveld 408576698