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

Unified Diff: ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc

Issue 2930273002: Use ContainsValue() instead of std::find() in ui/accessibility, ui/gl and ui/ozone (Closed)
Patch Set: Rebase patch Created 3 years, 6 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 | « ui/gl/test/egl_initialization_displays_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc
index a71335ec54cca6bb06b646d9248cb45f90723b51..a9b9661b3b0f589b49133790bda9093fb2dc5f3f 100644
--- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc
+++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc
@@ -5,6 +5,7 @@
#include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h"
#include "base/bind.h"
+#include "base/stl_util.h"
#include "ui/ozone/platform/drm/gpu/crtc_controller.h"
#include "ui/ozone/platform/drm/gpu/drm_device.h"
#include "ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.h"
@@ -37,10 +38,7 @@ bool HardwareDisplayPlaneManagerAtomic::Commit(
HardwareDisplayPlaneList* plane_list,
bool test_only) {
for (HardwareDisplayPlane* plane : plane_list->old_plane_list) {
- bool found =
- std::find(plane_list->plane_list.begin(), plane_list->plane_list.end(),
- plane) != plane_list->plane_list.end();
- if (!found) {
+ if (!base::ContainsValue(plane_list->plane_list, plane)) {
// This plane is being released, so we need to zero it.
plane->set_in_use(false);
HardwareDisplayPlaneAtomic* atomic_plane =
« no previous file with comments | « ui/gl/test/egl_initialization_displays_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698