Commit 8322f15d authored by Jongheon Kim's avatar Jongheon Kim Committed by Commit Bot

Use base::ContainsValue() instead of std::find() in gpu/

This patch simplifies conditions around the code in gpu/

Bug: 561800
Change-Id: I798f95ba388c8f6b0e5488ef053e62b763363e07
Reviewed-on: https://chromium-review.googlesource.com/1186289Reviewed-by: default avatarBrandon Jones <bajones@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#590181}
parent f68077fb
...@@ -420,6 +420,7 @@ Jonathan Frazer <listedegarde@gmail.com> ...@@ -420,6 +420,7 @@ Jonathan Frazer <listedegarde@gmail.com>
Jonathan Garbee <jonathan@garbee.me> Jonathan Garbee <jonathan@garbee.me>
Jonathan Hacker <jhacker@arcanefour.com> Jonathan Hacker <jhacker@arcanefour.com>
Jongdeok Kim <jongdeok.kim@navercorp.com> Jongdeok Kim <jongdeok.kim@navercorp.com>
Jongheon Kim <sapzape@gmail.com>
JongKwon Lee <jongkwon.lee@navercorp.com> JongKwon Lee <jongkwon.lee@navercorp.com>
Jongsoo Lee <leejongsoo@gmail.com> Jongsoo Lee <leejongsoo@gmail.com>
Joone Hur <joone.hur@intel.com> Joone Hur <joone.hur@intel.com>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <string> #include <string>
#include "base/command_line.h" #include "base/command_line.h"
#include "base/stl_util.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/config/gpu_driver_bug_workarounds.h" #include "gpu/config/gpu_driver_bug_workarounds.h"
#include "gpu/config/gpu_info_collector.h" #include "gpu/config/gpu_info_collector.h"
...@@ -365,9 +366,8 @@ bool GpuCommandBufferTestEGL::InitializeEGLGLES2(int width, int height) { ...@@ -365,9 +366,8 @@ bool GpuCommandBufferTestEGL::InitializeEGLGLES2(int width, int height) {
if (gl::GetGLImplementation() != if (gl::GetGLImplementation() !=
gl::GLImplementation::kGLImplementationEGLGLES2) { gl::GLImplementation::kGLImplementationEGLGLES2) {
const auto impls = gl::init::GetAllowedGLImplementations(); const auto impls = gl::init::GetAllowedGLImplementations();
if (std::find(impls.begin(), impls.end(), if (!base::ContainsValue(impls,
gl::GLImplementation::kGLImplementationEGLGLES2) == gl::GLImplementation::kGLImplementationEGLGLES2)) {
impls.end()) {
LOG(INFO) << "Skip test, implementation EGLGLES2 is not available"; LOG(INFO) << "Skip test, implementation EGLGLES2 is not available";
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment