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

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: Rebasing + dusting off... Created 4 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/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 bee05e7bd6e9299d52bba0d54efd2391104bc5d2..3428b0841793a83118268992c59d8bbb6dbcec2d 100644
--- a/components/html_viewer/html_frame.cc
+++ b/components/html_viewer/html_frame.cc
@@ -650,9 +650,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_));
}
@@ -1044,9 +1045,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