1 #include "precompiled.h" 2 // 3 // Copyright (c) 2013 The ANGLE Project Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style license that can be 5 // found in the LICENSE file. 6 // 7 8 // copyimage.cpp: Defines image copying functions 9 10 #include "libGLESv2/renderer/copyImage.h" 11 12 namespace rx 13 { 14 15 void CopyBGRAUByteToRGBAUByte(const void *source, void *dest) 16 { 17 unsigned int argb = *(unsigned int*)source; 18 *(unsigned int*)dest = (argb & 0xFF00FF00) | // Keep alpha and green 19 (argb & 0x00FF0000) >> 16 | // Move red to blue 20 (argb & 0x000000FF) << 16; // Move blue to red 21 } 22 23 } 24