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

Unified Diff: third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp

Issue 2771703002: Shape Detection: initialize all mojo::Bitmap fields (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
diff --git a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
index 259193e66be82d84c0f5a969ca73da37f550ed4c..cd0d39717612380b2306d1395a2a61b990d512e1 100644
--- a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
@@ -28,10 +28,13 @@ skia::mojom::blink::BitmapPtr createBitmapFromData(int width,
skia::mojom::blink::BitmapPtr bitmap = skia::mojom::blink::Bitmap::New();
bitmap->color_type = (kN32_SkColorType == kRGBA_8888_SkColorType)
- ? skia::mojom::ColorType::RGBA_8888
- : skia::mojom::ColorType::BGRA_8888;
+ ? skia::mojom::blink::ColorType::RGBA_8888
+ : skia::mojom::blink::ColorType::BGRA_8888;
+ bitmap->alpha_type = skia::mojom::blink::AlphaType::ALPHA_TYPE_OPAQUE;
+ bitmap->profile_type = skia::mojom::blink::ColorProfileType::LINEAR;
bitmap->width = width;
bitmap->height = height;
+ bitmap->row_bytes = width * 4 /* bytes per pixel */;
bitmap->pixel_data = std::move(bitmapData);
return bitmap;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698