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..3863b052db92f7b90cbb07c53add57ff4c51c087 100644 |
--- a/ui/gl/test/gl_image_test_support.cc |
+++ b/ui/gl/test/gl_image_test_support.cc |
@@ -60,6 +60,17 @@ void GLImageTestSupport::SetBufferDataToColor(int width, |
memset(&data[y * stride], color[0], width); |
} |
return; |
+ case gfx::BufferFormat::R_16: |
+ DCHECK_EQ(0, plane); |
+ uint16_t red; |
+ red = (uint16_t)color[0] << 8; |
reveman
2017/06/14 17:47:21
nit: "uint16_t red = static_cast<uint16_t>(color[0
riju_
2017/06/20 13:21:31
Done.
|
+ 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] = red; |
+ } |
+ } |
+ return; |
case gfx::BufferFormat::BGR_565: |
DCHECK_EQ(0, plane); |
for (int y = 0; y < height; ++y) { |