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

Unified Diff: components/html_viewer/html_frame.cc

Issue 1496103002: Reusing base::IdType<...> to implement SurfaceId. Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-id-base
Patch Set: Created 5 years 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/test/surface_aggregator_test_helpers.cc ('k') | components/mus/surfaces/top_level_display_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/html_frame.cc
diff --git a/components/html_viewer/html_frame.cc b/components/html_viewer/html_frame.cc
index 1ddb99768877a1b0fa760f061800a83a05c210b4..effbb141e6b442f9cbd569fd89b4c00c79d17d04 100644
--- a/components/html_viewer/html_frame.cc
+++ b/components/html_viewer/html_frame.cc
@@ -641,9 +641,10 @@ void HTMLFrame::SwapToRemote() {
cc::SurfaceLayer::Create(cc_blink::WebLayerImpl::LayerSettings(),
base::Bind(&SatisfyCallback),
base::Bind(&RequireCallback));
- surface_layer_->SetSurfaceId(cc::SurfaceId(owned_window_->window()->id()),
- global_state()->device_pixel_ratio(),
- owned_window_->window()->bounds().size());
+ surface_layer_->SetSurfaceId(
+ cc::SurfaceId::FromUnsafeValue(owned_window_->window()->id()),
+ global_state()->device_pixel_ratio(),
+ owned_window_->window()->bounds().size());
web_layer_.reset(new cc_blink::WebLayerImpl(surface_layer_));
}
@@ -1031,9 +1032,10 @@ void HTMLFrame::frameRectsChanged(const blink::WebRect& frame_rect) {
if (!surface_layer_)
return;
- surface_layer_->SetSurfaceId(cc::SurfaceId(owned_window_->window()->id()),
- global_state()->device_pixel_ratio(),
- owned_window_->window()->bounds().size());
+ surface_layer_->SetSurfaceId(
+ cc::SurfaceId::FromUnsafeValue(owned_window_->window()->id()),
+ global_state()->device_pixel_ratio(),
+ owned_window_->window()->bounds().size());
}
} // namespace mojo
« no previous file with comments | « cc/test/surface_aggregator_test_helpers.cc ('k') | components/mus/surfaces/top_level_display_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698