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

Unified Diff: android_webview/browser/surfaces_instance.cc

Issue 2425923003: Replaced is_null() with is_valid in SurfaceId and related classes. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 | « android_webview/browser/hardware_renderer.cc ('k') | blimp/client/core/compositor/blimp_compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/surfaces_instance.cc
diff --git a/android_webview/browser/surfaces_instance.cc b/android_webview/browser/surfaces_instance.cc
index ef96e989804b30acded4c6eb47684a526ad8f56c..0f71caa7a623c87bb055ab301d68608190f00bc6 100644
--- a/android_webview/browser/surfaces_instance.cc
+++ b/android_webview/browser/surfaces_instance.cc
@@ -85,7 +85,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_);
@@ -136,7 +136,7 @@ void SurfacesInstance::DrawAndSwap(const gfx::Size& viewport,
frame.render_pass_list.push_back(std::move(render_pass));
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);
@@ -152,7 +152,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();
}
@@ -160,7 +160,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();
}
« no previous file with comments | « android_webview/browser/hardware_renderer.cc ('k') | blimp/client/core/compositor/blimp_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698