From 66ce3e08c5632a20ea66bde6dd76397041edf034 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Wed, 28 Sep 2016 10:07:20 -0700 Subject: system/core Replace cutils/log.h with android/log.h Should use android/log.h instead of cutils/log.h as a good example to all others. Adjust header order to comply with Android Coding standards. Test: Compile Bug: 26552300 Bug: 31289077 Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031 --- libpixelflinger/codeflinger/ARMAssembler.cpp | 20 ++++----- .../codeflinger/ARMAssemblerInterface.cpp | 22 ++++----- libpixelflinger/codeflinger/Arm64Assembler.cpp | 5 +-- libpixelflinger/codeflinger/CodeCache.cpp | 7 ++- libpixelflinger/codeflinger/GGLAssembler.cpp | 21 ++++----- libpixelflinger/codeflinger/MIPS64Assembler.cpp | 7 +-- libpixelflinger/codeflinger/MIPSAssembler.cpp | 6 +-- libpixelflinger/codeflinger/blending.cpp | 21 +++++---- libpixelflinger/codeflinger/load_store.cpp | 52 +++++++++++----------- libpixelflinger/codeflinger/mips64_disassem.c | 11 +++-- libpixelflinger/codeflinger/texturing.cpp | 20 ++++----- libpixelflinger/scanline.cpp | 21 +++++---- .../assembler/mips64_assembler_test.cpp | 12 ++--- libpixelflinger/trap.cpp | 22 ++++----- 14 files changed, 121 insertions(+), 126 deletions(-) (limited to 'libpixelflinger') diff --git a/libpixelflinger/codeflinger/ARMAssembler.cpp b/libpixelflinger/codeflinger/ARMAssembler.cpp index 849512ac7..36c1326f7 100644 --- a/libpixelflinger/codeflinger/ARMAssembler.cpp +++ b/libpixelflinger/codeflinger/ARMAssembler.cpp @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ @@ -19,9 +19,9 @@ #include #include -#include -#include +#include +#include #include #include "ARMAssembler.h" diff --git a/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp b/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp index 50419996e..67eba8040 100644 --- a/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp +++ b/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp @@ -2,26 +2,26 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ - #include -#include #include +#include #include -#include +#include + #include "ARMAssemblerInterface.h" namespace android { diff --git a/libpixelflinger/codeflinger/Arm64Assembler.cpp b/libpixelflinger/codeflinger/Arm64Assembler.cpp index bd11818c2..fb297ec27 100644 --- a/libpixelflinger/codeflinger/Arm64Assembler.cpp +++ b/libpixelflinger/codeflinger/Arm64Assembler.cpp @@ -32,14 +32,13 @@ #include #include -#include +#include #include #include #include "codeflinger/Arm64Assembler.h" -#include "codeflinger/CodeCache.h" #include "codeflinger/Arm64Disassembler.h" - +#include "codeflinger/CodeCache.h" /* ** -------------------------------------------- diff --git a/libpixelflinger/codeflinger/CodeCache.cpp b/libpixelflinger/codeflinger/CodeCache.cpp index ae3851914..37bd0744e 100644 --- a/libpixelflinger/codeflinger/CodeCache.cpp +++ b/libpixelflinger/codeflinger/CodeCache.cpp @@ -15,17 +15,16 @@ ** limitations under the License. */ +#define LOG_TAG "CodeCache" #include #include #include -#include #include +#include +#include #include -#define LOG_TAG "CodeCache" -#include - #include "CodeCache.h" diff --git a/libpixelflinger/codeflinger/GGLAssembler.cpp b/libpixelflinger/codeflinger/GGLAssembler.cpp index 346779f47..0b9b5a472 100644 --- a/libpixelflinger/codeflinger/GGLAssembler.cpp +++ b/libpixelflinger/codeflinger/GGLAssembler.cpp @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ @@ -19,10 +19,11 @@ #include #include -#include #include +#include #include -#include + +#include #include "GGLAssembler.h" diff --git a/libpixelflinger/codeflinger/MIPS64Assembler.cpp b/libpixelflinger/codeflinger/MIPS64Assembler.cpp index b9f31ff11..a7bbaf7b1 100644 --- a/libpixelflinger/codeflinger/MIPS64Assembler.cpp +++ b/libpixelflinger/codeflinger/MIPS64Assembler.cpp @@ -25,24 +25,21 @@ ** */ - #define LOG_TAG "MIPS64Assembler" #include #include -#include -#include +#include +#include #include #include "MIPS64Assembler.h" #include "CodeCache.h" #include "mips64_disassem.h" - #define NOT_IMPLEMENTED() LOG_ALWAYS_FATAL("Arm instruction %s not yet implemented\n", __func__) - // ---------------------------------------------------------------------------- namespace android { diff --git a/libpixelflinger/codeflinger/MIPSAssembler.cpp b/libpixelflinger/codeflinger/MIPSAssembler.cpp index ae06a1344..4cddcc85b 100644 --- a/libpixelflinger/codeflinger/MIPSAssembler.cpp +++ b/libpixelflinger/codeflinger/MIPSAssembler.cpp @@ -52,13 +52,13 @@ #include #include -#include -#include +#include +#include #include -#include "MIPSAssembler.h" #include "CodeCache.h" +#include "MIPSAssembler.h" #include "mips_disassem.h" // Choose MIPS arch variant following gcc flags diff --git a/libpixelflinger/codeflinger/blending.cpp b/libpixelflinger/codeflinger/blending.cpp index b20219ced..d4aa47538 100644 --- a/libpixelflinger/codeflinger/blending.cpp +++ b/libpixelflinger/codeflinger/blending.cpp @@ -2,30 +2,29 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ #include #include -#include #include +#include #include -#include +#include #include "GGLAssembler.h" - namespace android { void GGLAssembler::build_fog( diff --git a/libpixelflinger/codeflinger/load_store.cpp b/libpixelflinger/codeflinger/load_store.cpp index e5a1ae010..d68f6dc73 100644 --- a/libpixelflinger/codeflinger/load_store.cpp +++ b/libpixelflinger/codeflinger/load_store.cpp @@ -2,22 +2,24 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ #include #include -#include + +#include + #include "GGLAssembler.h" namespace android { @@ -25,7 +27,7 @@ namespace android { // ---------------------------------------------------------------------------- void GGLAssembler::store(const pointer_t& addr, const pixel_t& s, uint32_t flags) -{ +{ const int bits = addr.size; const int inc = (flags & WRITE_BACK)?1:0; switch (bits) { @@ -59,8 +61,8 @@ void GGLAssembler::store(const pointer_t& addr, const pixel_t& s, uint32_t flags } void GGLAssembler::load(const pointer_t& addr, const pixel_t& s, uint32_t flags) -{ - Scratch scratches(registerFile()); +{ + Scratch scratches(registerFile()); int s0; const int bits = addr.size; @@ -72,7 +74,7 @@ void GGLAssembler::load(const pointer_t& addr, const pixel_t& s, uint32_t flags) break; case 24: // 24 bits formats are a little special and used only for RGB - // R,G,B is packed as 0x00BBGGRR + // R,G,B is packed as 0x00BBGGRR s0 = scratches.obtain(); if (s.reg != addr.reg) { LDRB(AL, s.reg, addr.reg, immed12_pre(0)); // R @@ -90,7 +92,7 @@ void GGLAssembler::load(const pointer_t& addr, const pixel_t& s, uint32_t flags) } if (inc) ADD(AL, 0, addr.reg, addr.reg, imm(3)); - break; + break; case 16: if (inc) LDRH(AL, s.reg, addr.reg, immed8_post(2)); else LDRH(AL, s.reg, addr.reg); @@ -112,7 +114,7 @@ void GGLAssembler::extract(integer_t& d, int s, int h, int l, int bits) assert(maskLen<=8); #endif assert(h); - + if (h != bits) { const int mask = ((1<> l; s = d.reg; } - + if (s != d.reg) { MOV(AL, 0, d.reg, s); } @@ -212,12 +214,12 @@ void GGLAssembler::expand(integer_t& dst, const integer_t& src, int dbits) } while(dbits>0); return; } - + dbits -= sbits; do { ORR(AL, 0, d, s, reg_imm(s, LSL, sbits)); // d |= d<dbits) { // see if we need to dither dithering = mDithering; } - + int ireg = d.reg; if (!(d.flags & FIRST)) { if (s.flags & CORRUPTIBLE) { @@ -271,7 +273,7 @@ void GGLAssembler::downshift( if (isValidImmediate(mask) || isValidImmediate(~mask)) { build_and_immediate(ireg, s.reg, mask, 32); sl = offset; - s.reg = ireg; + s.reg = ireg; sbits = dbits; maskLoBits = maskHiBits = 0; } @@ -281,7 +283,7 @@ void GGLAssembler::downshift( const uint32_t mask = ((1<>dbits) SUB(AL, 0, ireg, s.reg, reg_imm(s.reg, LSR, dbits)); @@ -333,7 +335,7 @@ void GGLAssembler::downshift( if (shift>0) ADD(AL, 0, ireg, ireg, reg_imm(dither.reg, LSR, shift)); else if (shift<0) ADD(AL, 0, ireg, ireg, reg_imm(dither.reg, LSL,-shift)); else ADD(AL, 0, ireg, ireg, dither.reg); - s.reg = ireg; + s.reg = ireg; } if ((maskLoBits|dithering) && (sh > dbits)) { diff --git a/libpixelflinger/codeflinger/mips64_disassem.c b/libpixelflinger/codeflinger/mips64_disassem.c index 44b7fe7cd..f28d72627 100644 --- a/libpixelflinger/codeflinger/mips64_disassem.c +++ b/libpixelflinger/codeflinger/mips64_disassem.c @@ -34,21 +34,20 @@ * from: @(#)kadb.c 8.1 (Berkeley) 6/10/93 */ -#include -#include #include #include +#include +#include #include - #include -#include "mips_opcode.h" -#include +#include + +#include "mips_opcode.h" static char *sprintf_buffer; static int sprintf_buf_len; - typedef uint64_t db_addr_t; static void db_printf(const char* fmt, ...); diff --git a/libpixelflinger/codeflinger/texturing.cpp b/libpixelflinger/codeflinger/texturing.cpp index 29a3742c1..d66981dad 100644 --- a/libpixelflinger/codeflinger/texturing.cpp +++ b/libpixelflinger/codeflinger/texturing.cpp @@ -2,26 +2,26 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ #include #include -#include #include +#include #include -#include +#include #include "GGLAssembler.h" diff --git a/libpixelflinger/scanline.cpp b/libpixelflinger/scanline.cpp index aa1836053..1a2f6fb91 100644 --- a/libpixelflinger/scanline.cpp +++ b/libpixelflinger/scanline.cpp @@ -2,29 +2,28 @@ ** ** Copyright 2006-2011, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ - #define LOG_TAG "pixelflinger" #include -#include #include +#include #include +#include #include -#include #include "buffer.h" #include "scanline.h" diff --git a/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp b/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp index e8c4626b2..9fb0a2802 100644 --- a/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp +++ b/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp @@ -26,21 +26,21 @@ * SUCH DAMAGE. */ +#include +#define __STDC_FORMAT_MACROS +#include #include #include #include +#include #include -#include -#include +#include #include -#include - -#define __STDC_FORMAT_MACROS -#include #include "codeflinger/ARMAssemblerInterface.h" #include "codeflinger/MIPS64Assembler.h" + using namespace android; #define TESTS_DATAOP_ENABLE 1 diff --git a/libpixelflinger/trap.cpp b/libpixelflinger/trap.cpp index ea5362553..f00e50aee 100644 --- a/libpixelflinger/trap.cpp +++ b/libpixelflinger/trap.cpp @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ @@ -19,12 +19,12 @@ #include #include +#include +#include + #include "trap.h" #include "picker.h" -#include -#include - namespace android { // ---------------------------------------------------------------------------- -- cgit v1.2.3