| Index: android_webview/browser/surfaces_instance.cc
|
| diff --git a/android_webview/browser/surfaces_instance.cc b/android_webview/browser/surfaces_instance.cc
|
| index 23843c01cfc1e8d04f1b77ddca60d87dc5750ccd..f033ee66478e92a0d813a88195ae513cc47ef1f7 100644
|
| --- a/android_webview/browser/surfaces_instance.cc
|
| +++ b/android_webview/browser/surfaces_instance.cc
|
| @@ -86,7 +86,7 @@ SurfacesInstance::~SurfacesInstance() {
|
| g_surfaces_instance = nullptr;
|
|
|
| DCHECK(child_ids_.empty());
|
| - if (!root_id_.is_null())
|
| + if (root_id_.is_valid())
|
| surface_factory_->Destroy(root_id_);
|
|
|
| surface_manager_->InvalidateFrameSinkId(frame_sink_id_);
|
| @@ -135,7 +135,7 @@ void SurfacesInstance::DrawAndSwap(const gfx::Size& viewport,
|
| frame.delegated_frame_data = std::move(delegated_frame);
|
| frame.metadata.referenced_surfaces = child_ids_;
|
|
|
| - if (root_id_.is_null()) {
|
| + if (!root_id_.is_valid()) {
|
| root_id_ = surface_id_allocator_->GenerateId();
|
| surface_factory_->Create(root_id_);
|
| display_->SetSurfaceId(cc::SurfaceId(frame_sink_id_, root_id_), 1.f);
|
| @@ -151,7 +151,7 @@ void SurfacesInstance::AddChildId(const cc::SurfaceId& child_id) {
|
| DCHECK(std::find(child_ids_.begin(), child_ids_.end(), child_id) ==
|
| child_ids_.end());
|
| child_ids_.push_back(child_id);
|
| - if (!root_id_.is_null())
|
| + if (root_id_.is_valid())
|
| SetEmptyRootFrame();
|
| }
|
|
|
| @@ -159,7 +159,7 @@ void SurfacesInstance::RemoveChildId(const cc::SurfaceId& child_id) {
|
| auto itr = std::find(child_ids_.begin(), child_ids_.end(), child_id);
|
| DCHECK(itr != child_ids_.end());
|
| child_ids_.erase(itr);
|
| - if (!root_id_.is_null())
|
| + if (root_id_.is_valid())
|
| SetEmptyRootFrame();
|
| }
|
|
|
|
|