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

Unified Diff: cc/ipc/surface_info_struct_traits.h

Issue 2720503008: Add cc::SurfaceInfo::is_valid() (Closed)
Patch Set: Added Log() Created 3 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/ipc/cc_param_traits_unittest.cc ('k') | cc/layers/surface_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/surface_info_struct_traits.h
diff --git a/cc/ipc/surface_info_struct_traits.h b/cc/ipc/surface_info_struct_traits.h
index b1484f829cb28eb9482ffc473b1f05699d9f553e..8b032e311d2a79f71f6e9b6e94b510d94cca27a6 100644
--- a/cc/ipc/surface_info_struct_traits.h
+++ b/cc/ipc/surface_info_struct_traits.h
@@ -27,7 +27,7 @@ struct StructTraits<cc::mojom::SurfaceInfoDataView, cc::SurfaceInfo> {
static bool Read(cc::mojom::SurfaceInfoDataView data, cc::SurfaceInfo* out) {
out->device_scale_factor_ = data.device_scale_factor();
return data.ReadSurfaceId(&out->id_) &&
- data.ReadSizeInPixels(&out->size_in_pixels_);
+ data.ReadSizeInPixels(&out->size_in_pixels_) && out->is_valid();
}
};
« no previous file with comments | « cc/ipc/cc_param_traits_unittest.cc ('k') | cc/layers/surface_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698