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

Unified Diff: services/ui/ws/frame_generator.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 | « services/ui/public/cpp/window.cc ('k') | services/ui/ws/server_window_compositor_frame_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/frame_generator.cc
diff --git a/services/ui/ws/frame_generator.cc b/services/ui/ws/frame_generator.cc
index d9333340ad44ef18123c913388d8d969e8a5c36b..0859cff95ebdbb7a5e51ce8246e9052951b3d06a 100644
--- a/services/ui/ws/frame_generator.cc
+++ b/services/ui/ws/frame_generator.cc
@@ -166,10 +166,10 @@ void FrameGenerator::DrawWindowTree(
window->compositor_frame_sink_manager()->GetLatestSurfaceId(
mojom::CompositorFrameSinkType::DEFAULT);
- if (underlay_surface_id.is_null() && default_surface_id.is_null())
+ if (!underlay_surface_id.is_valid() && !default_surface_id.is_valid())
return;
- if (!default_surface_id.is_null()) {
+ if (default_surface_id.is_valid()) {
gfx::Transform quad_to_target_transform;
quad_to_target_transform.Translate(absolute_bounds.x(),
absolute_bounds.y());
@@ -193,7 +193,7 @@ void FrameGenerator::DrawWindowTree(
bounds_at_origin /* visible_rect */, true /* needs_blending*/,
default_surface_id);
}
- if (!underlay_surface_id.is_null()) {
+ if (underlay_surface_id.is_valid()) {
const gfx::Rect underlay_absolute_bounds =
absolute_bounds - window->underlay_offset();
gfx::Transform quad_to_target_transform;
@@ -225,7 +225,7 @@ void FrameGenerator::AddOrUpdateSurfaceReference(
ServerWindow* window) {
cc::SurfaceId surface_id =
window->compositor_frame_sink_manager()->GetLatestSurfaceId(type);
- if (surface_id.is_null())
+ if (!surface_id.is_valid())
return;
auto it = dependencies_.find(surface_id.frame_sink_id());
if (it == dependencies_.end()) {
@@ -295,13 +295,13 @@ void FrameGenerator::OnWindowDestroying(ServerWindow* window) {
cc::SurfaceId default_surface_id =
window->compositor_frame_sink_manager()->GetLatestSurfaceId(
mojom::CompositorFrameSinkType::DEFAULT);
- if (!default_surface_id.is_null())
+ if (default_surface_id.is_valid())
ReleaseFrameSinkReference(default_surface_id.frame_sink_id());
cc::SurfaceId underlay_surface_id =
window->compositor_frame_sink_manager()->GetLatestSurfaceId(
mojom::CompositorFrameSinkType::UNDERLAY);
- if (!underlay_surface_id.is_null())
+ if (underlay_surface_id.is_valid())
ReleaseFrameSinkReference(underlay_surface_id.frame_sink_id());
}
« no previous file with comments | « services/ui/public/cpp/window.cc ('k') | services/ui/ws/server_window_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698