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

Unified Diff: services/ui/ws/server_window_surface.cc

Issue 2425923003: Replaced is_null() with is_valid in SurfaceId and related classes. (Closed)
Patch Set: Removed added printf statements; LocalFrameId::is_valid() no longer checks if nonce is 0. Created 4 years, 2 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
Index: services/ui/ws/server_window_surface.cc
diff --git a/services/ui/ws/server_window_surface.cc b/services/ui/ws/server_window_surface.cc
index 01de6021a8ed06c1b95be5dd8b4bc29e37ed9162..1a7c76eb5ad321486d377267d080d0aaee8378c0 100644
--- a/services/ui/ws/server_window_surface.cc
+++ b/services/ui/ws/server_window_surface.cc
@@ -50,8 +50,8 @@ void ServerWindowSurface::SubmitCompositorFrame(
frame.delegated_frame_data->render_pass_list[0]->output_rect.size();
// If the size of the CompostiorFrame has changed then destroy the existing
// Surface and create a new one of the appropriate size.
- if (local_frame_id_.is_null() || frame_size != last_submitted_frame_size_) {
- if (!local_frame_id_.is_null())
+ if (!local_frame_id_.is_valid() || frame_size != last_submitted_frame_size_) {
+ if (local_frame_id_.is_valid())
surface_factory_.Destroy(local_frame_id_);
local_frame_id_ = surface_id_allocator_.GenerateId();
surface_factory_.Create(local_frame_id_);
@@ -64,7 +64,7 @@ void ServerWindowSurface::SubmitCompositorFrame(
}
cc::SurfaceId ServerWindowSurface::GetSurfaceId() const {
- if (local_frame_id_.is_null())
+ if (!local_frame_id_.is_valid())
return cc::SurfaceId();
return cc::SurfaceId(frame_sink_id_, local_frame_id_);
}

Powered by Google App Engine
This is Rietveld 408576698