Index: ui/gl/test/gl_image_test_support.cc |
diff --git a/ui/gl/test/gl_image_test_support.cc b/ui/gl/test/gl_image_test_support.cc |
index b77b2fd9d3863fd9553c0a50210d3647139f864a..abd8aa2f839109f7d3536639e88ed7c9325620ed 100644 |
--- a/ui/gl/test/gl_image_test_support.cc |
+++ b/ui/gl/test/gl_image_test_support.cc |
@@ -60,6 +60,15 @@ void GLImageTestSupport::SetBufferDataToColor(int width, |
memset(&data[y * stride], color[0], width); |
} |
return; |
+ case gfx::BufferFormat::R_16: |
+ DCHECK_EQ(0, plane); |
+ for (int y = 0; y < height; ++y) { |
+ uint16_t* row = reinterpret_cast<uint16_t*>(data + y * stride); |
+ for (int x = 0; x < width; ++x) { |
+ row[x] = static_cast<uint16_t>(color[0] << 8); |
+ } |
+ } |
+ return; |
case gfx::BufferFormat::BGR_565: |
DCHECK_EQ(0, plane); |
for (int y = 0; y < height; ++y) { |