Skip to content

Commit

Permalink
Replace std::copy() with base::ranges::copy(): gpu/
Browse files Browse the repository at this point in the history
Bug: 1368812
Change-Id: If3d3ed6e84ffb676181e9fa7ea7893dbf65fb545
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3988888
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Chris Bookholt <bookholt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1065029}
  • Loading branch information
pkasting authored and Chromium LUCI CQ committed Oct 28, 2022
1 parent c543629 commit 3323e08
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions gpu/command_buffer/service/context_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <stddef.h>

#include <algorithm>
#include <cmath>

#include "base/cxx17_backports.h"
Expand Down
1 change: 1 addition & 0 deletions gpu/command_buffer/service/gles2_cmd_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <stdint.h>
#include <stdio.h>

#include <algorithm>
#include <cmath>
#include <limits>
#include <list>
Expand Down
4 changes: 2 additions & 2 deletions gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2243,7 +2243,7 @@ error::Error GLES2DecoderPassthroughImpl::PatchGetNumericResults(GLenum pname,
if (length < 4) {
return error::kInvalidArguments;
}
std::copy(std::begin(viewport_), std::end(viewport_), params);
base::ranges::copy(viewport_, params);
break;

case GL_SCISSOR_BOX:
Expand All @@ -2252,7 +2252,7 @@ error::Error GLES2DecoderPassthroughImpl::PatchGetNumericResults(GLenum pname,
if (length < 4) {
return error::kInvalidArguments;
}
std::copy(std::begin(scissor_), std::end(scissor_), params);
base::ranges::copy(scissor_, params);
break;

default:
Expand Down
4 changes: 3 additions & 1 deletion gpu/ipc/common/gpu_feature_info_mojom_traits.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// found in the LICENSE file.

#include "gpu/ipc/common/gpu_feature_info_mojom_traits.h"

#include "base/ranges/algorithm.h"
#include "build/build_config.h"

namespace mojo {
Expand All @@ -15,7 +17,7 @@ bool StructTraits<gpu::mojom::GpuFeatureInfoDataView, gpu::GpuFeatureInfo>::
return false;
if (info_status.size() != gpu::NUMBER_OF_GPU_FEATURE_TYPES)
return false;
std::copy(info_status.begin(), info_status.end(), out->status_values);
base::ranges::copy(info_status, out->status_values);
return data.ReadEnabledGpuDriverBugWorkarounds(
&out->enabled_gpu_driver_bug_workarounds) &&
data.ReadDisabledExtensions(&out->disabled_extensions) &&
Expand Down

0 comments on commit 3323e08

Please sign in to comment.