Path: blob/main_old/src/image_util/copyimage.cpp
1693 views
//1// Copyright 2013 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//56// copyimage.cpp: Defines image copying functions78#include "image_util/copyimage.h"910namespace angle11{1213void CopyBGRA8ToRGBA8(const uint8_t *source, uint8_t *dest)14{15uint32_t argb = *reinterpret_cast<const uint32_t *>(source);16*reinterpret_cast<uint32_t *>(dest) = (argb & 0xFF00FF00) | // Keep alpha and green17(argb & 0x00FF0000) >> 16 | // Move red to blue18(argb & 0x000000FF) << 16; // Move blue to red19}2021} // namespace angle222324