diff options
author | Torne (Richard Coles) <torne@google.com> | 2013-05-29 14:40:03 +0100 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2013-05-29 14:40:03 +0100 |
commit | 90dce4d38c5ff5333bea97d859d4e484e27edf0c (patch) | |
tree | 9c51c7dd97d24b15befa97a3482c51851e5383a1 /skia | |
parent | 1515035f5917d10d363b0888a3615d581ad8b83f (diff) | |
download | chromium_org-90dce4d38c5ff5333bea97d859d4e484e27edf0c.tar.gz |
Merge from Chromium at DEPS revision r202854
This commit was generated by merge_to_master.py.
Change-Id: Idca323f71ef844a9e04f454d4f070b1e398f2deb
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/analysis_canvas.cc | 10 | ||||
-rw-r--r-- | skia/ext/analysis_canvas.h | 7 | ||||
-rw-r--r-- | skia/ext/analysis_canvas_unittest.cc | 5 | ||||
-rw-r--r-- | skia/ext/convolver.cc | 10 | ||||
-rw-r--r-- | skia/ext/convolver.h | 4 | ||||
-rw-r--r-- | skia/ext/convolver_SSE2.cc | 3 | ||||
-rw-r--r-- | skia/ext/convolver_SSE2.h | 3 | ||||
-rw-r--r-- | skia/ext/convolver_mips_dspr2.cc | 478 | ||||
-rw-r--r-- | skia/ext/convolver_mips_dspr2.h | 25 | ||||
-rw-r--r-- | skia/ext/recursive_gaussian_convolution.cc | 5 | ||||
-rw-r--r-- | skia/ext/recursive_gaussian_convolution_unittest.cc | 73 | ||||
-rw-r--r-- | skia/ext/refptr.h | 26 | ||||
-rw-r--r-- | skia/skia.gyp | 13 | ||||
-rw-r--r-- | skia/skia.target.darwin-arm.mk | 20 | ||||
-rw-r--r-- | skia/skia.target.darwin-x86.mk | 20 | ||||
-rw-r--r-- | skia/skia.target.linux-arm.mk | 20 | ||||
-rw-r--r-- | skia/skia.target.linux-x86.mk | 20 | ||||
-rw-r--r-- | skia/skia_opts.target.darwin-arm.mk | 7 | ||||
-rw-r--r-- | skia/skia_opts.target.darwin-x86.mk | 7 | ||||
-rw-r--r-- | skia/skia_opts.target.linux-arm.mk | 7 | ||||
-rw-r--r-- | skia/skia_opts.target.linux-x86.mk | 7 | ||||
-rw-r--r-- | skia/skia_test_expectations.txt | 20 |
22 files changed, 709 insertions, 81 deletions
diff --git a/skia/ext/analysis_canvas.cc b/skia/ext/analysis_canvas.cc index cf13127d87..272568ee0d 100644 --- a/skia/ext/analysis_canvas.cc +++ b/skia/ext/analysis_canvas.cc @@ -71,13 +71,12 @@ AnalysisDevice::AnalysisDevice(const SkBitmap& bm) : INHERITED(bm) , isForcedNotSolid_(false) , isForcedNotTransparent_(false) - , isSolidColor_(false) - , isTransparent_(false) + , isSolidColor_(true) + , isTransparent_(true) , hasText_(false) { } AnalysisDevice::~AnalysisDevice() { - } bool AnalysisDevice::getColorIfSolid(SkColor* color) const { @@ -290,6 +289,11 @@ bool AnalysisCanvas::hasText() const { return (static_cast<AnalysisDevice*>(getDevice()))->hasText(); } +bool AnalysisCanvas::abortDrawing() { + // Early out as soon as we have detected that the tile has text. + return hasText(); +} + bool AnalysisCanvas::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) { return INHERITED::clipRect(rect, op, doAA); diff --git a/skia/ext/analysis_canvas.h b/skia/ext/analysis_canvas.h index 67151d36e5..249c3c28b3 100644 --- a/skia/ext/analysis_canvas.h +++ b/skia/ext/analysis_canvas.h @@ -7,6 +7,7 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkDevice.h" +#include "third_party/skia/include/core/SkPicture.h" namespace skia { @@ -18,7 +19,7 @@ class AnalysisDevice; // To use: create a SkBitmap with kNo_Config, create an AnalysisDevice // using that bitmap, and create an AnalysisCanvas using the device. // Play a picture into the canvas, and then check result. -class SK_API AnalysisCanvas : public SkCanvas { +class SK_API AnalysisCanvas : public SkCanvas, public SkDrawPictureCallback { public: AnalysisCanvas(AnalysisDevice*); virtual ~AnalysisCanvas(); @@ -27,6 +28,10 @@ class SK_API AnalysisCanvas : public SkCanvas { bool getColorIfSolid(SkColor* color) const; bool hasText() const; + // SkDrawPictureCallback override. + virtual bool abortDrawing() OVERRIDE; + + // SkCanvas overrides. virtual bool clipRect(const SkRect& rect, SkRegion::Op op = SkRegion::kIntersect_Op, bool doAntiAlias = false) OVERRIDE; diff --git a/skia/ext/analysis_canvas_unittest.cc b/skia/ext/analysis_canvas_unittest.cc index d271a9ecec..3efcafc0c6 100644 --- a/skia/ext/analysis_canvas_unittest.cc +++ b/skia/ext/analysis_canvas_unittest.cc @@ -25,9 +25,10 @@ TEST(AnalysisCanvasTest, EmptyCanvas) { emptyBitmap.setConfig(SkBitmap::kNo_Config, 255, 255); skia::AnalysisDevice device(emptyBitmap); skia::AnalysisCanvas canvas(&device); - + SkColor color; - EXPECT_FALSE(canvas.getColorIfSolid(&color)); + EXPECT_TRUE(canvas.getColorIfSolid(&color)); + EXPECT_EQ(color, SkColorSetARGB(0, 0, 0, 0)); } TEST(AnalysisCanvasTest, ClearCanvas) { diff --git a/skia/ext/convolver.cc b/skia/ext/convolver.cc index a7824aafb1..4b40ffd2ce 100644 --- a/skia/ext/convolver.cc +++ b/skia/ext/convolver.cc @@ -7,6 +7,7 @@ #include "base/logging.h" #include "skia/ext/convolver.h" #include "skia/ext/convolver_SSE2.h" +#include "skia/ext/convolver_mips_dspr2.h" #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" @@ -347,7 +348,8 @@ typedef void (*Convolve4RowsHorizontally_pointer)( typedef void (*ConvolveHorizontally_pointer)( const unsigned char* src_data, const ConvolutionFilter1D& filter, - unsigned char* out_row); + unsigned char* out_row, + bool has_alpha); struct ConvolveProcs { // This is how many extra pixels may be read by the @@ -367,6 +369,10 @@ void SetupSIMD(ConvolveProcs *procs) { procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; procs->convolve_horizontally = &ConvolveHorizontally_SSE2; } +#elif defined SIMD_MIPS_DSPR2 + procs->extra_horizontal_reads = 3; + procs->convolve_vertically = &ConvolveVertically_mips_dspr2; + procs->convolve_horizontally = &ConvolveHorizontally_mips_dspr2; #endif } @@ -464,7 +470,7 @@ void BGRAConvolve2D(const unsigned char* source_data, avoid_simd_rows) { simd.convolve_horizontally( &source_data[next_x_row * source_byte_row_stride], - filter_x, row_buffer.AdvanceRow()); + filter_x, row_buffer.AdvanceRow(), source_has_alpha); } else { if (source_has_alpha) { ConvolveHorizontally<true>( diff --git a/skia/ext/convolver.h b/skia/ext/convolver.h index 4248bc6bf0..dd99a7272f 100644 --- a/skia/ext/convolver.h +++ b/skia/ext/convolver.h @@ -20,6 +20,10 @@ #define SIMD_PADDING 8 // 8 * int16 #endif +#if defined (ARCH_CPU_MIPS_FAMILY) && \ + defined(__mips_dsp) && (__mips_dsp_rev >= 2) +#define SIMD_MIPS_DSPR2 1 +#endif // avoid confusion with Mac OS X's math library (Carbon) #if defined(__APPLE__) #undef FloatToFixed diff --git a/skia/ext/convolver_SSE2.cc b/skia/ext/convolver_SSE2.cc index a823edcb51..a77a1f45c4 100644 --- a/skia/ext/convolver_SSE2.cc +++ b/skia/ext/convolver_SSE2.cc @@ -16,7 +16,8 @@ namespace skia { // |src_data| and continues for the num_values() of the filter. void ConvolveHorizontally_SSE2(const unsigned char* src_data, const ConvolutionFilter1D& filter, - unsigned char* out_row) { + unsigned char* out_row, + bool /*has_alpha*/) { int num_values = filter.num_values(); int filter_offset, filter_length; diff --git a/skia/ext/convolver_SSE2.h b/skia/ext/convolver_SSE2.h index 6b79daee8c..cf604067e9 100644 --- a/skia/ext/convolver_SSE2.h +++ b/skia/ext/convolver_SSE2.h @@ -20,7 +20,8 @@ void Convolve4RowsHorizontally_SSE2(const unsigned char* src_data[4], unsigned char* out_row[4]); void ConvolveHorizontally_SSE2(const unsigned char* src_data, const ConvolutionFilter1D& filter, - unsigned char* out_row); + unsigned char* out_row, + bool has_alpha); } // namespace skia #endif // SKIA_EXT_CONVOLVER_SSE2_H_ diff --git a/skia/ext/convolver_mips_dspr2.cc b/skia/ext/convolver_mips_dspr2.cc new file mode 100644 index 0000000000..955abef7a5 --- /dev/null +++ b/skia/ext/convolver_mips_dspr2.cc @@ -0,0 +1,478 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <algorithm> +#include "skia/ext/convolver.h" +#include "skia/ext/convolver_mips_dspr2.h" +#include "third_party/skia/include/core/SkTypes.h" + +namespace skia { +// Convolves horizontally along a single row. The row data is given in +// |src_data| and continues for the num_values() of the filter. +void ConvolveHorizontally_mips_dspr2(const unsigned char* src_data, + const ConvolutionFilter1D& filter, + unsigned char* out_row, + bool has_alpha) { +#if SIMD_MIPS_DSPR2 + int row_to_filter = 0; + int num_values = filter.num_values(); + if (has_alpha) { + for (int out_x = 0; out_x < num_values; out_x++) { + // Get the filter that determines the current output pixel. + int filter_offset, filter_length; + const ConvolutionFilter1D::Fixed* filter_values = + filter.FilterForValue(out_x, &filter_offset, &filter_length); + int filter_x = 0; + + __asm__ __volatile__ ( + ".set push \n" + ".set noreorder \n" + + "beqz %[filter_len], 3f \n" + " sll $t0, %[filter_offset], 2 \n" + "addu %[rtf], %[src_data], $t0 \n" + "mtlo $0, $ac0 \n" + "mtlo $0, $ac1 \n" + "mtlo $0, $ac2 \n" + "mtlo $0, $ac3 \n" + "srl $t7, %[filter_len], 2 \n" + "beqz $t7, 2f \n" + " li %[fx], 0 \n" + + "11: \n" + "addu $t4, %[filter_val], %[fx] \n" + "sll $t5, %[fx], 1 \n" + "ulw $t6, 0($t4) \n" // t6 = |cur[1]|cur[0]| + "ulw $t8, 4($t4) \n" // t8 = |cur[3]|cur[2]| + "addu $t0, %[rtf], $t5 \n" + "lw $t1, 0($t0) \n" // t1 = |a0|b0|g0|r0| + "lw $t2, 4($t0) \n" // t2 = |a1|b1|g1|r1| + "lw $t3, 8($t0) \n" // t3 = |a2|b2|g2|r2| + "lw $t4, 12($t0) \n" // t4 = |a3|b3|g3|r3| + "precrq.qb.ph $t0, $t2, $t1 \n" // t0 = |a1|g1|a0|g0| + "precr.qb.ph $t5, $t2, $t1 \n" // t5 = |b1|r1|b0|r0| + "preceu.ph.qbla $t1, $t0 \n" // t1 = |0|a1|0|a0| + "preceu.ph.qbra $t2, $t0 \n" // t2 = |0|g1|0|g0| + "preceu.ph.qbla $t0, $t5 \n" // t0 = |0|b1|0|b0| + "preceu.ph.qbra $t5, $t5 \n" // t5 = |0|r1|0|r0| + "dpa.w.ph $ac0, $t1, $t6 \n" // ac0+(cur*a1)+(cur*a0) + "dpa.w.ph $ac1, $t0, $t6 \n" // ac1+(cur*b1)+(cur*b0) + "dpa.w.ph $ac2, $t2, $t6 \n" // ac2+(cur*g1)+(cur*g0) + "dpa.w.ph $ac3, $t5, $t6 \n" // ac3+(cur*r1)+(cur*r0) + "precrq.qb.ph $t0, $t4, $t3 \n" // t0 = |a3|g3|a2|g2| + "precr.qb.ph $t5, $t4, $t3 \n" // t5 = |b3|r3|b2|r2| + "preceu.ph.qbla $t1, $t0 \n" // t1 = |0|a3|0|a2| + "preceu.ph.qbra $t2, $t0 \n" // t2 = |0|g3|0|g2| + "preceu.ph.qbla $t0, $t5 \n" // t0 = |0|b3|0|b2| + "preceu.ph.qbra $t5, $t5 \n" // t5 = |0|r3|0|r2| + "dpa.w.ph $ac0, $t1, $t8 \n" // ac0+(cur*a3)+(cur*a2) + "dpa.w.ph $ac1, $t0, $t8 \n" // ac1+(cur*b3)+(cur*b2) + "dpa.w.ph $ac2, $t2, $t8 \n" // ac2+(cur*g3)+(cur*g2) + "dpa.w.ph $ac3, $t5, $t8 \n" // ac3+(cur*r3)+(cur*r2) + "addiu $t7, $t7, -1 \n" + "bgtz $t7, 11b \n" + " addiu %[fx], %[fx], 8 \n" + + "2: \n" + "andi $t7, %[filter_len], 0x3 \n" // residual + "beqz $t7, 3f \n" + " nop \n" + + "21: \n" + "sll $t1, %[fx], 1 \n" + "addu $t2, %[filter_val], %[fx] \n" + "addu $t0, %[rtf], $t1 \n" + "lh $t6, 0($t2) \n" // t6 = filter_val[fx] + "lbu $t1, 0($t0) \n" // t1 = row[fx * 4 + 0] + "lbu $t2, 1($t0) \n" // t2 = row[fx * 4 + 1] + "lbu $t3, 2($t0) \n" // t3 = row[fx * 4 + 2] + "lbu $t4, 3($t0) \n" // t4 = row[fx * 4 + 2] + "maddu $ac3, $t6, $t1 \n" + "maddu $ac2, $t6, $t2 \n" + "maddu $ac1, $t6, $t3 \n" + "maddu $ac0, $t6, $t4 \n" + "addiu $t7, $t7, -1 \n" + "bgtz $t7, 21b \n" + " addiu %[fx], %[fx], 2 \n" + + "3: \n" + "extrv.w $t0, $ac0, %[kShiftBits] \n" // a >> kShiftBits + "extrv.w $t1, $ac1, %[kShiftBits] \n" // b >> kShiftBits + "extrv.w $t2, $ac2, %[kShiftBits] \n" // g >> kShiftBits + "extrv.w $t3, $ac3, %[kShiftBits] \n" // r >> kShiftBits + "sll $t5, %[out_x], 2 \n" + "repl.ph $t6, 128 \n" // t6 = | 128 | 128 | + "addu $t5, %[out_row], $t5 \n" + "append $t2, $t3, 16 \n" + "append $t0, $t1, 16 \n" + "subu.ph $t1, $t0, $t6 \n" + "shll_s.ph $t1, $t1, 8 \n" + "shra.ph $t1, $t1, 8 \n" + "addu.ph $t1, $t1, $t6 \n" + "subu.ph $t3, $t2, $t6 \n" + "shll_s.ph $t3, $t3, 8 \n" + "shra.ph $t3, $t3, 8 \n" + "addu.ph $t3, $t3, $t6 \n" + "precr.qb.ph $t0, $t1, $t3 \n" + "usw $t0, 0($t5) \n" + + ".set pop \n" + : [fx] "+r" (filter_x), [out_x] "+r" (out_x), [out_row] "+r" (out_row), + [rtf] "+r" (row_to_filter) + : [filter_val] "r" (filter_values), [filter_len] "r" (filter_length), + [kShiftBits] "r" (ConvolutionFilter1D::kShiftBits), + [filter_offset] "r" (filter_offset), [src_data] "r" (src_data) + : "lo", "hi", "$ac1lo", "$ac1hi", "$ac2lo", "$ac2hi", "$ac3lo", "$ac3hi", + "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8" + ); + } + } else { + for (int out_x = 0; out_x < num_values; out_x++) { + // Get the filter that determines the current output pixel. + int filter_offset, filter_length; + const ConvolutionFilter1D::Fixed* filter_values = + filter.FilterForValue(out_x, &filter_offset, &filter_length); + int filter_x = 0; + __asm__ __volatile__ ( + ".set push \n" + ".set noreorder \n" + + "beqz %[filter_len], 3f \n" + " sll $t0, %[filter_offset], 2 \n" + "addu %[rtf], %[src_data], $t0 \n" + "mtlo $0, $ac1 \n" + "mtlo $0, $ac2 \n" + "mtlo $0, $ac3 \n" + "srl $t7, %[filter_len], 2 \n" + "beqz $t7, 2f \n" + " li %[fx], 0 \n" + + "11: \n" + "addu $t4, %[filter_val], %[fx] \n" + "sll $t5, %[fx], 1 \n" + "ulw $t6, 0($t4) \n" // t6 = |cur[1]|cur[0]| + "ulw $t8, 4($t4) \n" // t8 = |cur[3]|cur[2]| + "addu $t0, %[rtf], $t5 \n" + "lw $t1, 0($t0) \n" // t1 = |a0|b0|g0|r0| + "lw $t2, 4($t0) \n" // t2 = |a1|b1|g1|r1| + "lw $t3, 8($t0) \n" // t3 = |a2|b2|g2|r2| + "lw $t4, 12($t0) \n" // t4 = |a3|b3|g3|r3| + "precrq.qb.ph $t0, $t2, $t1 \n" // t0 = |a1|g1|a0|g0| + "precr.qb.ph $t5, $t2, $t1 \n" // t5 = |b1|r1|b0|r0| + "preceu.ph.qbra $t2, $t0 \n" // t2 = |0|g1|0|g0| + "preceu.ph.qbla $t0, $t5 \n" // t0 = |0|b1|0|b0| + "preceu.ph.qbra $t5, $t5 \n" // t5 = |0|r1|0|r0| + "dpa.w.ph $ac1, $t0, $t6 \n" // ac1+(cur*b1)+(cur*b0) + "dpa.w.ph $ac2, $t2, $t6 \n" // ac2+(cur*g1)+(cur*g0) + "dpa.w.ph $ac3, $t5, $t6 \n" // ac3+(cur*r1)+(cur*r0) + "precrq.qb.ph $t0, $t4, $t3 \n" // t0 = |a3|g3|a2|g2| + "precr.qb.ph $t5, $t4, $t3 \n" // t5 = |b3|r3|b2|r2| + "preceu.ph.qbra $t2, $t0 \n" // t2 = |0|g3|0|g2| + "preceu.ph.qbla $t0, $t5 \n" // t0 = |0|b3|0|b2| + "preceu.ph.qbra $t5, $t5 \n" // t5 = |0|r3|0|r2| + "dpa.w.ph $ac1, $t0, $t8 \n" // ac1+(cur*b3)+(cur*b2) + "dpa.w.ph $ac2, $t2, $t8 \n" // ac2+(cur*g3)+(cur*g2) + "dpa.w.ph $ac3, $t5, $t8 \n" // ac3+(cur*r3)+(cur*r2) + "addiu $t7, $t7, -1 \n" + "bgtz $t7, 11b \n" + " addiu %[fx], %[fx], 8 \n" + + "2: \n" + "andi $t7, %[filter_len], 0x3 \n" // residual + "beqz $t7, 3f \n" + " nop \n" + + "21: \n" + "sll $t1, %[fx], 1 \n" + "addu $t2, %[filter_val], %[fx] \n" + "addu $t0, %[rtf], $t1 \n" + "lh $t6, 0($t2) \n" // t6 = filter_val[fx] + "lbu $t1, 0($t0) \n" // t1 = row[fx * 4 + 0] + "lbu $t2, 1($t0) \n" // t2 = row[fx * 4 + 1] + "lbu $t3, 2($t0) \n" // t3 = row[fx * 4 + 2] + "maddu $ac3, $t6, $t1 \n" + "maddu $ac2, $t6, $t2 \n" + "maddu $ac1, $t6, $t3 \n" + "addiu $t7, $t7, -1 \n" + "bgtz $t7, 21b \n" + " addiu %[fx], %[fx], 2 \n" + + "3: \n" + "extrv.w $t1, $ac1, %[kShiftBits] \n" // b >> kShiftBits + "extrv.w $t2, $ac2, %[kShiftBits] \n" // g >> kShiftBits + "extrv.w $t3, $ac3, %[kShiftBits] \n" // r >> kShiftBits + "repl.ph $t6, 128 \n" // t6 = | 128 | 128 | + "sll $t8, %[out_x], 2 \n" + "addu $t8, %[out_row], $t8 \n" + "append $t2, $t3, 16 \n" + "andi $t1, 0xFFFF \n" + "subu.ph $t5, $t1, $t6 \n" + "shll_s.ph $t5, $t5, 8 \n" + "shra.ph $t5, $t5, 8 \n" + "addu.ph $t5, $t5, $t6 \n" + "subu.ph $t4, $t2, $t6 \n" + "shll_s.ph $t4, $t4, 8 \n" + "shra.ph $t4, $t4, 8 \n" + "addu.ph $t4, $t4, $t6 \n" + "precr.qb.ph $t0, $t5, $t4 \n" + "usw $t0, 0($t8) \n" + + ".set pop \n" + : [fx] "+r" (filter_x), [out_x] "+r" (out_x), [out_row] "+r" (out_row), + [rtf] "+r" (row_to_filter) + : [filter_val] "r" (filter_values), [filter_len] "r" (filter_length), + [kShiftBits] "r" (ConvolutionFilter1D::kShiftBits), + [filter_offset] "r" (filter_offset), [src_data] "r" (src_data) + : "lo", "hi", "$ac1lo", "$ac1hi", "$ac2lo", "$ac2hi", "$ac3lo", "$ac3hi", + "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8" + ); + } + } +#endif +} +void ConvolveVertically_mips_dspr2(const ConvolutionFilter1D::Fixed* filter_val, + int filter_length, + unsigned char* const* source_data_rows, + int pixel_width, + unsigned char* out_row, + bool has_alpha) { +#if SIMD_MIPS_DSPR2 + // We go through each column in the output and do a vertical convolution, + // generating one output pixel each time. + int byte_offset; + int cnt; + int filter_y; + if (has_alpha) { + for (int out_x = 0; out_x < pixel_width; out_x++) { + __asm__ __volatile__ ( + ".set push \n" + ".set noreorder \n" + + "beqz %[filter_len], 3f \n" + " sll %[offset], %[out_x], 2 \n" + "mtlo $0, $ac0 \n" + "mtlo $0, $ac1 \n" + "mtlo $0, $ac2 \n" + "mtlo $0, $ac3 \n" + "srl %[cnt], %[filter_len], 2 \n" + "beqz %[cnt], 2f \n" + " li %[fy], 0 \n" + + "11: \n" + "sll $t1, %[fy], 1 \n" + "addu $t0, %[src_data_rows], $t1 \n" + "lw $t1, 0($t0) \n" + "lw $t2, 4($t0) \n" + "lw $t3, 8($t0) \n" + "lw $t4, 12($t0) \n" + "addu $t1, $t1, %[offset] \n" + "addu $t2, $t2, %[offset] \n" + "addu $t3, $t3, %[offset] \n" + "addu $t4, $t4, %[offset] \n" + "lw $t1, 0($t1) \n" // t1 = |a0|b0|g0|r0| + "lw $t2, 0($t2) \n" // t2 = |a1|b1|g1|r1| + "lw $t3, 0($t3) \n" // t3 = |a0|b0|g0|r0| + "lw $t4, 0($t4) \n" // t4 = |a1|b1|g1|r1| + "precrq.qb.ph $t5, $t2, $t1 \n" // t5 = |a1|g1|a0|g0| + "precr.qb.ph $t6, $t2, $t1 \n" // t6 = |b1|r1|b0|r0| + "preceu.ph.qbla $t0, $t5 \n" // t0 = |0|a1|0|a0| + "preceu.ph.qbra $t1, $t5 \n" // t1 = |0|g1|0|g0| + "preceu.ph.qbla $t2, $t6 \n" // t2 = |0|b1|0|b0| + "preceu.ph.qbra $t5, $t6 \n" // t5 = |0|r1|0|r0| + "addu $t6, %[filter_val], %[fy] \n" + "ulw $t7, 0($t6) \n" // t7 = |cur_1|cur_0| + "ulw $t6, 4($t6) \n" // t6 = |cur_3|cur_2| + "dpa.w.ph $ac0, $t5, $t7 \n" // (cur*r1)+(cur*r0) + "dpa.w.ph $ac1, $t1, $t7 \n" // (cur*g1)+(cur*g0) + "dpa.w.ph $ac2, $t2, $t7 \n" // (cur*b1)+(cur*b0) + "dpa.w.ph $ac3, $t0, $t7 \n" // (cur*a1)+(cur*a0) + "precrq.qb.ph $t5, $t4, $t3 \n" // t5 = |a3|g3|a2|g2| + "precr.qb.ph $t7, $t4, $t3 \n" // t7 = |b3|r3|b2|r2| + "preceu.ph.qbla $t0, $t5 \n" // t0 = |0|a3|0|a2| + "preceu.ph.qbra $t1, $t5 \n" // t1 = |0|g3|0|g2| + "preceu.ph.qbla $t2, $t7 \n" // t2 = |0|b3|0|b2| + "preceu.ph.qbra $t5, $t7 \n" // t5 = |0|r3|0|r2| + "dpa.w.ph $ac0, $t5, $t6 \n" // (cur*r3)+(cur*r2) + "dpa.w.ph $ac1, $t1, $t6 \n" // (cur*g3)+(cur*g2) + "dpa.w.ph $ac2, $t2, $t6 \n" // (cur*b3)+(cur*b2) + "dpa.w.ph $ac3, $t0, $t6 \n" // (cur*a3)+(cur*a2) + "addiu %[cnt], %[cnt], -1 \n" + "bgtz %[cnt], 11b \n" + " addiu %[fy], %[fy], 8 \n" + + "2: \n" + "andi %[cnt], %[filter_len], 0x3 \n" // residual + "beqz %[cnt], 3f \n" + " nop \n" + + "21: \n" + "addu $t0, %[filter_val], %[fy] \n" + "lh $t4, 0($t0) \n" // t4=filter_val[fx] + "sll $t1, %[fy], 1 \n" + "addu $t0, %[src_data_rows], $t1 \n" + "lw $t1, 0($t0) \n" + "addu $t0, $t1, %[offset] \n" + "lbu $t1, 0($t0) \n" // t1 = row[fx*4 + 0] + "lbu $t2, 1($t0) \n" // t2 = row[fx*4 + 1] + "lbu $t3, 2($t0) \n" // t3 = row[fx*4 + 2] + "lbu $t0, 3($t0) \n" // t4 = row[fx*4 + 2] + "maddu $ac0, $t4, $t1 \n" + "maddu $ac1, $t4, $t2 \n" + "maddu $ac2, $t4, $t3 \n" + "maddu $ac3, $t4, $t0 \n" + "addiu %[cnt], %[cnt], -1 \n" + "bgtz %[cnt], 21b \n" + " addiu %[fy], %[fy], 2 \n" + + "3: \n" + "extrv.w $t3, $ac0, %[kShiftBits] \n" // a >> kShiftBits + "extrv.w $t2, $ac1, %[kShiftBits] \n" // b >> kShiftBits + "extrv.w $t1, $ac2, %[kShiftBits] \n" // g >> kShiftBits + "extrv.w $t0, $ac3, %[kShiftBits] \n" // r >> kShiftBits + "repl.ph $t4, 128 \n" // t4 = | 128 | 128 | + "addu $t5, %[out_row], %[offset] \n" + "append $t2, $t3, 16 \n" // t2 = |0|g|0|r| + "append $t0, $t1, 16 \n" // t0 = |0|a|0|b| + "subu.ph $t1, $t0, $t4 \n" + "shll_s.ph $t1, $t1, 8 \n" + "shra.ph $t1, $t1, 8 \n" + "addu.ph $t1, $t1, $t4 \n" // Clamp(a)|Clamp(b) + "subu.ph $t2, $t2, $t4 \n" + "shll_s.ph $t2, $t2, 8 \n" + "shra.ph $t2, $t2, 8 \n" + "addu.ph $t2, $t2, $t4 \n" // Clamp(g)|Clamp(r) + "andi $t3, $t1, 0xFF \n" // t3 = ClampTo8(b) + "cmp.lt.ph $t3, $t2 \n" // cmp b, g, r + "pick.ph $t0, $t2, $t3 \n" + "andi $t3, $t0, 0xFF \n" + "srl $t4, $t0, 16 \n" + "cmp.lt.ph $t3, $t4 \n" + "pick.ph $t0, $t4, $t3 \n" // t0 = max_color_ch + "srl $t3, $t1, 16 \n" // t1 = ClampTo8(a) + "cmp.lt.ph $t3, $t0 \n" + "pick.ph $t0, $t0, $t3 \n" + "ins $t1, $t0, 16, 8 \n" + "precr.qb.ph $t0, $t1, $t2 \n" // t0 = |a|b|g|r| + "usw $t0, 0($t5) \n" + + ".set pop \n" + : [filter_val] "+r" (filter_val), [filter_len] "+r" (filter_length), + [offset] "+r" (byte_offset), [fy] "+r" (filter_y), [cnt] "+r" (cnt), + [out_x] "+r" (out_x), [pixel_width] "+r" (pixel_width) + : [src_data_rows] "r" (source_data_rows), [out_row] "r" (out_row), + [kShiftBits] "r" (ConvolutionFilter1D::kShiftBits) + : "lo", "hi", "$ac1lo", "$ac1hi", "$ac2lo", "$ac2hi", "$ac3lo", "$ac3hi", + "t0", "t1", "t2", "t3", "t4", "t5", "t6","t7", "memory" + ); + } + } else { + for (int out_x = 0; out_x < pixel_width; out_x++) { + __asm__ __volatile__ ( + ".set push \n" + ".set noreorder \n" + + "beqz %[filter_len], 3f \n" + " sll %[offset], %[out_x], 2 \n" + "mtlo $0, $ac0 \n" + "mtlo $0, $ac1 \n" + "mtlo $0, $ac2 \n" + "srl %[cnt], %[filter_len], 2 \n" + "beqz %[cnt], 2f \n" + " li %[fy], 0 \n" + + "11: \n" + "sll $t1, %[fy], 1 \n" + "addu $t0, %[src_data_rows], $t1 \n" + "lw $t1, 0($t0) \n" + "lw $t2, 4($t0) \n" + "lw $t3, 8($t0) \n" + "lw $t4, 12($t0) \n" + "addu $t1, $t1, %[offset] \n" + "addu $t2, $t2, %[offset] \n" + "addu $t3, $t3, %[offset] \n" + "addu $t4, $t4, %[offset] \n" + "lw $t1, 0($t1) \n" // t1 = |a0|b0|g0|r0| + "lw $t2, 0($t2) \n" // t2 = |a1|b1|g1|r1| + "lw $t3, 0($t3) \n" // t3 = |a0|b0|g0|r0| + "lw $t4, 0($t4) \n" // t4 = |a1|b1|g1|r1| + "precrq.qb.ph $t5, $t2, $t1 \n" // t5 = |a1|g1|a0|g0| + "precr.qb.ph $t6, $t2, $t1 \n" // t6 = |b1|r1|b0|r0| + "preceu.ph.qbra $t1, $t5 \n" // t1 = |0|g1|0|g0| + "preceu.ph.qbla $t2, $t6 \n" // t2 = |0|b1|0|b0| + "preceu.ph.qbra $t5, $t6 \n" // t5 = |0|r1|0|r0| + "addu $t6, %[filter_val], %[fy] \n" + "ulw $t0, 0($t6) \n" // t0 = |cur_1|cur_0| + "ulw $t6, 4($t6) \n" // t6 = |cur_1|cur_0| + "dpa.w.ph $ac0, $t5, $t0 \n" // (cur*r1)+(cur*r0) + "dpa.w.ph $ac1, $t1, $t0 \n" // (cur*g1)+(cur*g0) + "dpa.w.ph $ac2, $t2, $t0 \n" // (cur*b1)+(cur*b0) + "precrq.qb.ph $t5, $t4, $t3 \n" // t5 = |a3|g3|a2|g2| + "precr.qb.ph $t0, $t4, $t3 \n" // t0 = |b3|r3|b2|r2| + "preceu.ph.qbra $t1, $t5 \n" // t1 = |0|g3|0|g2| + "preceu.ph.qbla $t2, $t0 \n" // t2 = |0|b3|0|b2| + "preceu.ph.qbra $t5, $t0 \n" // t5 = |0|r3|0|r2| + "dpa.w.ph $ac0, $t5, $t6 \n" // (cur*r1)+(cur*r0) + "dpa.w.ph $ac1, $t1, $t6 \n" // (cur*g1)+(cur*g0) + "dpa.w.ph $ac2, $t2, $t6 \n" // (cur*b1)+(cur*b0) + "addiu %[cnt], %[cnt], -1 \n" + "bgtz %[cnt], 11b \n" + " addiu %[fy], %[fy], 8 \n" + + "2: \n" + "andi %[cnt], %[filter_len], 0x3 \n" // residual + "beqz %[cnt], 3f \n" + " nop \n" + + "21: \n" + "addu $t0, %[filter_val], %[fy] \n" + "lh $t4, 0($t0) \n" // filter_val[fx] + "sll $t1, %[fy], 1 \n" + "addu $t0, %[src_data_rows], $t1 \n" + "lw $t1, 0($t0) \n" + "addu $t0, $t1, %[offset] \n" + "lbu $t1, 0($t0) \n" // t1 = row[fx*4 + 0] + "lbu $t2, 1($t0) \n" // t2 = row[fx*4 + 1] + "lbu $t3, 2($t0) \n" // t3 = row[fx*4 + 2] + "maddu $ac0, $t4, $t1 \n" + "maddu $ac1, $t4, $t2 \n" + "maddu $ac2, $t4, $t3 \n" + "addiu %[cnt], %[cnt], -1 \n" + "bgtz %[cnt], 21b \n" + " addiu %[fy], %[fy], 2 \n" + + "3: \n" + "extrv.w $t3, $ac0, %[kShiftBits] \n" // r >> kShiftBits + "extrv.w $t2, $ac1, %[kShiftBits] \n" // g >> kShiftBits + "extrv.w $t1, $ac2, %[kShiftBits] \n" // b >> kShiftBits + "repl.ph $t6, 128 \n" // t6 = | 128 | 128 | + "addu $t5, %[out_row], %[offset] \n" + "append $t2, $t3, 16 \n" // t2 = |0|g|0|r| + "andi $t1, $t1, 0xFFFF \n" + "subu.ph $t1, $t1, $t6 \n" + "shll_s.ph $t1, $t1, 8 \n" + "shra.ph $t1, $t1, 8 \n" + "addu.ph $t1, $t1, $t6 \n" // Clamp(a)|Clamp(b) + "subu.ph $t2, $t2, $t6 \n" + "shll_s.ph $t2, $t2, 8 \n" + "shra.ph $t2, $t2, 8 \n" + "addu.ph $t2, $t2, $t6 \n" // Clamp(g)|Clamp(r) + "li $t0, 0xFF \n" + "ins $t1, $t0, 16, 8 \n" + "precr.qb.ph $t0, $t1, $t2 \n" // t0 = |a|b|g|r| + "usw $t0, 0($t5) \n" + + ".set pop \n" + : [filter_val] "+r" (filter_val), [filter_len] "+r" (filter_length), + [offset] "+r" (byte_offset), [fy] "+r" (filter_y), [cnt] "+r" (cnt), + [out_x] "+r" (out_x), [pixel_width] "+r" (pixel_width) + : [src_data_rows] "r" (source_data_rows), [out_row] "r" (out_row), + [kShiftBits] "r" (ConvolutionFilter1D::kShiftBits) + : "lo", "hi", "$ac1lo", "$ac1hi", "$ac2lo", "$ac2hi", "$ac3lo", "$ac3hi", + "t0", "t1", "t2", "t3", "t4", "t5", "t6", "memory" + ); + } + } +#endif +} +} // namespace skia diff --git a/skia/ext/convolver_mips_dspr2.h b/skia/ext/convolver_mips_dspr2.h new file mode 100644 index 0000000000..a5e59f935b --- /dev/null +++ b/skia/ext/convolver_mips_dspr2.h @@ -0,0 +1,25 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SKIA_EXT_CONVOLVER_MIPS_DSPR2_H_ +#define SKIA_EXT_CONVOLVER_MIPS_DSPR2_H_ + +#include "skia/ext/convolver.h" + +namespace skia { + +void ConvolveVertically_mips_dspr2(const ConvolutionFilter1D::Fixed* filter_val, + int filter_length, + unsigned char* const* source_data_rows, + int pixel_width, + unsigned char* out_row, + bool has_alpha); + +void ConvolveHorizontally_mips_dspr2(const unsigned char* src_data, + const ConvolutionFilter1D& filter, + unsigned char* out_row, + bool has_alpha); +} // namespace skia + +#endif // SKIA_EXT_CONVOLVER_MIPS_DSPR2_H_ diff --git a/skia/ext/recursive_gaussian_convolution.cc b/skia/ext/recursive_gaussian_convolution.cc index 32802b164c..195fca8dea 100644 --- a/skia/ext/recursive_gaussian_convolution.cc +++ b/skia/ext/recursive_gaussian_convolution.cc @@ -90,7 +90,10 @@ unsigned char SingleChannelRecursiveFilter( ++r, in += source_row_stride, out += output_row_stride) { // Compute forward filter. // First initialize start of the w (temporary) vector. - w[0] = w[1] = w[2] = in[0]; + if (order == RecursiveFilter::FUNCTION) + w[0] = w[1] = w[2] = in[0]; + else + w[0] = w[1] = w[2] = 0.0f; // Note that special-casing of w[3] is needed because of derivatives. w[3] = ForwardFilter<order>( in[0], in[0], in[source_pixel_stride], w, 3, b); diff --git a/skia/ext/recursive_gaussian_convolution_unittest.cc b/skia/ext/recursive_gaussian_convolution_unittest.cc index e51bb6057c..ac3f78cfd2 100644 --- a/skia/ext/recursive_gaussian_convolution_unittest.cc +++ b/skia/ext/recursive_gaussian_convolution_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <functional> #include <numeric> #include <vector> @@ -206,6 +207,31 @@ TEST(RecursiveGaussian, SmoothingImpulse) { // Symmetricity along X/Y (not really assured, but should be close). EXPECT_NEAR(value_x, value_y, 1); } + + // Smooth the inverse now. + std::vector<unsigned char> output2(dest_byte_count); + std::transform(input.begin(), input.end(), input.begin(), + std::bind1st(std::minus<unsigned char>(), 255U)); + SingleChannelRecursiveGaussianY(&input[0], src_row_stride, + kChannelIndex, kChannelCount, + recursive_filter, image_size, + &intermediate[0], dest_row_stride, + 0, 1, false); + SingleChannelRecursiveGaussianX(&intermediate[0], dest_row_stride, 0, 1, + recursive_filter, image_size, + &output2[0], dest_row_stride, 0, 1, false); + // The image should be the reverse of output, but permitting for rounding + // we will only claim that wherever output is 0, output2 should be 255. + // There still can be differences at the edges of the object. + std::vector<unsigned char>::const_iterator i1, i2; + int difference_count = 0; + for (i1 = output.begin(), i2 = output2.begin(); + i1 != output.end(); ++i1, ++i2) { + // The line below checks (*i1 == 0 <==> *i2 == 255). + if ((*i1 != 0 && *i2 == 255) && ! (*i1 == 0 && *i2 != 255)) + ++difference_count; + } + EXPECT_LE(difference_count, 8); } TEST(RecursiveGaussian, FirstDerivative) { @@ -255,21 +281,44 @@ TEST(RecursiveGaussian, FirstDerivative) { *target = *ix + *iy; } + SkIRect inflated_rect(box); + inflated_rect.outset(spread, spread); + SkIRect deflated_rect(box); + deflated_rect.inset(spread, spread); + int image_total = ComputeBoxSum(output, SkIRect::MakeWH(kImgWidth, kImgHeight), kImgWidth); - int box_inflated = ComputeBoxSum(output, - SkIRect::MakeLTRB(box.left() - spread, - box.top() - spread, - box.right() + spread, - box.bottom() + spread), - kImgWidth); - int box_deflated = ComputeBoxSum(output, - SkIRect::MakeLTRB(box.left() + spread, - box.top() + spread, - box.right() - spread, - box.bottom() - spread), - kImgWidth); + int box_inflated = ComputeBoxSum(output, inflated_rect, kImgWidth); + int box_deflated = ComputeBoxSum(output, deflated_rect, kImgWidth); + EXPECT_EQ(box_deflated, 0); + EXPECT_EQ(image_total, box_inflated); + + // Try inverted image. Behaviour should be very similar (modulo rounding). + std::transform(input.begin(), input.end(), input.begin(), + std::bind1st(std::minus<unsigned char>(), 255U)); + SingleChannelRecursiveGaussianX(&input[0], src_row_stride, + kChannelIndex, kChannelCount, + recursive_filter, image_size, + &output_x[0], dest_row_stride, + 0, 1, true); + SingleChannelRecursiveGaussianY(&input[0], src_row_stride, + kChannelIndex, kChannelCount, + recursive_filter, image_size, + &output_y[0], dest_row_stride, + 0, 1, true); + + for (target = output.begin(), ix = output_x.begin(), iy = output_y.begin(); + target < output.end(); ++target, ++ix, ++iy) { + *target = *ix + *iy; + } + + image_total = ComputeBoxSum(output, + SkIRect::MakeWH(kImgWidth, kImgHeight), + kImgWidth); + box_inflated = ComputeBoxSum(output, inflated_rect, kImgWidth); + box_deflated = ComputeBoxSum(output, deflated_rect, kImgWidth); + EXPECT_EQ(box_deflated, 0); EXPECT_EQ(image_total, box_inflated); } diff --git a/skia/ext/refptr.h b/skia/ext/refptr.h index 514d453e03..a3900f61ba 100644 --- a/skia/ext/refptr.h +++ b/skia/ext/refptr.h @@ -13,7 +13,7 @@ namespace skia { // this class to avoid dealing with the ref-counting and prevent leaks/crashes // due to ref-counting bugs. // -// Example of Creating an SkShader* and setting it on a SkPaint: +// Example of creating a new SkShader* and setting it on a SkPaint: // skia::RefPtr<SkShader> shader = skia::AdoptRef(SkGradientShader::Create()); // paint.setShader(shader.get()); // @@ -25,12 +25,18 @@ namespace skia { // } // skia::RefPtr<SkShader> member_refptr_; // -// When returning a ref-counted ponter, also return the skia::RefPtr instead. An -// example method that creates an SkShader* and returns it: +// When returning a ref-counted pointer, also return the skia::RefPtr instead. +// An example method that creates an SkShader* and returns it: // skia::RefPtr<SkShader> MakeAShader() { // return skia::AdoptRef(SkGradientShader::Create()); // } // +// To take a scoped reference to an object whose references are all owned +// by other objects (i.e. does not have one that needs to be adopted) use the +// skia::SharePtr helper: +// +// skia::RefPtr<SkShader> shader = skia::SharePtr(paint.getShader()); +// // Never call ref() or unref() on the underlying ref-counted pointer. If you // AdoptRef() the raw pointer immediately into a skia::RefPtr and always work // with skia::RefPtr instances instead, the ref-counting will be taken care of @@ -84,15 +90,29 @@ class RefPtr { private: T* ptr_; + // This function cannot be public because Skia starts its ref-counted + // objects at refcnt=1. This makes it impossible to differentiate + // between a newly created object (that doesn't need to be ref'd) or an + // already existing object with one owner (that does need to be ref'd so that + // this RefPtr can also manage its lifetime). explicit RefPtr(T* ptr) : ptr_(ptr) {} template<typename U> friend RefPtr<U> AdoptRef(U* ptr); + + template<typename U> + friend RefPtr<U> SharePtr(U* ptr); }; +// For objects that have an unowned reference (such as newly created objects). template<typename T> RefPtr<T> AdoptRef(T* ptr) { return RefPtr<T>(ptr); } +// For objects that are already owned. This doesn't take ownership of existing +// references and adds a new one. +template<typename T> +RefPtr<T> SharePtr(T* ptr) { return RefPtr<T>(SkSafeRef(ptr)); } + } // namespace skia #endif // SKIA_EXT_REFPTR_H_ diff --git a/skia/skia.gyp b/skia/skia.gyp index 56f77d6f9d..4b79090d56 100644 --- a/skia/skia.gyp +++ b/skia/skia.gyp @@ -92,12 +92,12 @@ #'../third_party/skia/src/ports/SkPurgeableMemoryBlock_mac.cpp', '../third_party/skia/src/ports/SkPurgeableMemoryBlock_none.cpp', - '../third_party/skia/src/ports/FontHostConfiguration_android.cpp', + '../third_party/skia/src/ports/SkFontConfigInterface_android.cpp', #'../third_party/skia/src/ports/SkFontHost_FONTPATH.cpp', '../third_party/skia/src/ports/SkFontHost_FreeType.cpp', '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp', '../third_party/skia/src/ports/SkFontHost_FreeType_common.h', - '../third_party/skia/src/ports/SkFontHost_android.cpp', + '../third_party/skia/src/ports/SkFontConfigParser_android.cpp', #'../third_party/skia/src/ports/SkFontHost_ascender.cpp', #'../third_party/skia/src/ports/SkFontHost_linux.cpp', '../third_party/skia/src/ports/SkFontHost_mac.cpp', @@ -326,7 +326,7 @@ ['exclude', '_android\\.(cc|cpp)$'], ], 'sources!': [ - '../third_party/skia/src/core/SkPaintOptionsAndroid.cpp' + '../third_party/skia/src/core/SkPaintOptionsAndroid.cpp', ], 'defines': [ 'SK_DEFAULT_FONT_CACHE_LIMIT=(20*1024*1024)', @@ -371,6 +371,7 @@ '-Wno-unused-function', ], 'sources': [ + '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp', '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp', '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp', ], @@ -393,6 +394,9 @@ 'sources/': [ ['exclude', '_gtk\\.(cc|cpp)$'] ], }], [ 'OS == "android"', { + 'sources': [ + '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp', + ], 'sources/': [ ['exclude', '_linux\\.(cc|cpp)$'], ], @@ -743,6 +747,7 @@ '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', '../third_party/skia/src/opts/SkUtils_opts_none.cpp', + 'ext/convolver_mips_dspr2.cc', ], }], ], @@ -786,7 +791,7 @@ ], }, }], - [ 'target_arch != "arm"', { + [ 'target_arch != "arm" and target_arch != "mipsel"', { 'sources': [ '../third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp', ], diff --git a/skia/skia.target.darwin-arm.mk b/skia/skia.target.darwin-arm.mk index 28d33a5e46..5cd5dadd46 100644 --- a/skia/skia.target.darwin-arm.mk +++ b/skia/skia.target.darwin-arm.mk @@ -68,10 +68,10 @@ LOCAL_SRC_FILES := \ third_party/skia/src/core/SkPaintOptionsAndroid.cpp \ third_party/skia/src/images/SkScaledBitmapSampler.cpp \ third_party/skia/src/ports/SkPurgeableMemoryBlock_none.cpp \ - third_party/skia/src/ports/FontHostConfiguration_android.cpp \ + third_party/skia/src/ports/SkFontConfigInterface_android.cpp \ third_party/skia/src/ports/SkFontHost_FreeType.cpp \ third_party/skia/src/ports/SkFontHost_FreeType_common.cpp \ - third_party/skia/src/ports/SkFontHost_android.cpp \ + third_party/skia/src/ports/SkFontConfigParser_android.cpp \ third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp \ third_party/skia/src/ports/SkOSFile_stdio.cpp \ third_party/skia/src/ports/SkThread_pthread.cpp \ @@ -98,6 +98,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/core/SkBitmapHeap.cpp \ third_party/skia/src/core/SkBitmapProcShader.cpp \ third_party/skia/src/core/SkBitmapProcState.cpp \ + third_party/skia/src/core/SkBitmapProcBicubic.cpp \ third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp \ third_party/skia/src/core/SkBitmap_scroll.cpp \ third_party/skia/src/core/SkBlitMask_D32.cpp \ @@ -130,6 +131,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/core/SkDeviceProfile.cpp \ third_party/skia/src/core/SkDither.cpp \ third_party/skia/src/core/SkDraw.cpp \ + third_party/skia/src/core/SkDrawLooper.cpp \ third_party/skia/src/core/SkEdgeBuilder.cpp \ third_party/skia/src/core/SkEdgeClipper.cpp \ third_party/skia/src/core/SkEdge.cpp \ @@ -278,6 +280,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/effects/SkKernel33MaskFilter.cpp \ third_party/skia/src/effects/SkLayerDrawLooper.cpp \ third_party/skia/src/effects/SkLayerRasterizer.cpp \ + third_party/skia/src/effects/SkLerpXfermode.cpp \ third_party/skia/src/effects/SkLightingImageFilter.cpp \ third_party/skia/src/effects/SkMatrixConvolutionImageFilter.cpp \ third_party/skia/src/effects/SkMergeImageFilter.cpp \ @@ -383,7 +386,8 @@ LOCAL_SRC_FILES := \ third_party/skia/src/gpu/SkGrTexturePixelRef.cpp \ third_party/skia/src/image/SkImage_Gpu.cpp \ third_party/skia/src/image/SkSurface_Gpu.cpp \ - third_party/skia/src/gpu/gl/SkGLContextHelper.cpp + third_party/skia/src/gpu/gl/SkGLContextHelper.cpp \ + third_party/skia/src/ports/SkFontHost_fontconfig.cpp # Flags passed to both C and C++ files. @@ -430,6 +434,7 @@ MY_DEFS := \ '-DNO_TCMALLOC' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ + '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_GPU=1' \ @@ -455,6 +460,7 @@ MY_DEFS := \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_DEFAULT_FONT_CACHE_LIMIT=(8*1024*1024)' \ '-DUSE_CHROMIUM_SKIA' \ + '-DSK_IGNORE_MAC_TEXT_BOUNDS_FIX' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -490,11 +496,11 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/third_party/skia/src/gpu \ $(LOCAL_PATH)/third_party/expat/files/lib \ $(LOCAL_PATH)/third_party/zlib \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/expat/lib \ + $(PWD)/external/expat/lib \ $(LOCAL_PATH)/third_party/freetype/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/frameworks/wilhelm/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/bionic \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/stlport/stlport + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES) diff --git a/skia/skia.target.darwin-x86.mk b/skia/skia.target.darwin-x86.mk index ccbc71b9cd..c4fbcfb857 100644 --- a/skia/skia.target.darwin-x86.mk +++ b/skia/skia.target.darwin-x86.mk @@ -69,10 +69,10 @@ LOCAL_SRC_FILES := \ third_party/skia/src/images/SkScaledBitmapSampler.cpp \ third_party/skia/src/opts/opts_check_SSE2.cpp \ third_party/skia/src/ports/SkPurgeableMemoryBlock_none.cpp \ - third_party/skia/src/ports/FontHostConfiguration_android.cpp \ + third_party/skia/src/ports/SkFontConfigInterface_android.cpp \ third_party/skia/src/ports/SkFontHost_FreeType.cpp \ third_party/skia/src/ports/SkFontHost_FreeType_common.cpp \ - third_party/skia/src/ports/SkFontHost_android.cpp \ + third_party/skia/src/ports/SkFontConfigParser_android.cpp \ third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp \ third_party/skia/src/ports/SkOSFile_stdio.cpp \ third_party/skia/src/ports/SkThread_pthread.cpp \ @@ -99,6 +99,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/core/SkBitmapHeap.cpp \ third_party/skia/src/core/SkBitmapProcShader.cpp \ third_party/skia/src/core/SkBitmapProcState.cpp \ + third_party/skia/src/core/SkBitmapProcBicubic.cpp \ third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp \ third_party/skia/src/core/SkBitmap_scroll.cpp \ third_party/skia/src/core/SkBlitMask_D32.cpp \ @@ -131,6 +132,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/core/SkDeviceProfile.cpp \ third_party/skia/src/core/SkDither.cpp \ third_party/skia/src/core/SkDraw.cpp \ + third_party/skia/src/core/SkDrawLooper.cpp \ third_party/skia/src/core/SkEdgeBuilder.cpp \ third_party/skia/src/core/SkEdgeClipper.cpp \ third_party/skia/src/core/SkEdge.cpp \ @@ -279,6 +281,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/effects/SkKernel33MaskFilter.cpp \ third_party/skia/src/effects/SkLayerDrawLooper.cpp \ third_party/skia/src/effects/SkLayerRasterizer.cpp \ + third_party/skia/src/effects/SkLerpXfermode.cpp \ third_party/skia/src/effects/SkLightingImageFilter.cpp \ third_party/skia/src/effects/SkMatrixConvolutionImageFilter.cpp \ third_party/skia/src/effects/SkMergeImageFilter.cpp \ @@ -384,7 +387,8 @@ LOCAL_SRC_FILES := \ third_party/skia/src/gpu/SkGrTexturePixelRef.cpp \ third_party/skia/src/image/SkImage_Gpu.cpp \ third_party/skia/src/image/SkSurface_Gpu.cpp \ - third_party/skia/src/gpu/gl/SkGLContextHelper.cpp + third_party/skia/src/gpu/gl/SkGLContextHelper.cpp \ + third_party/skia/src/ports/SkFontHost_fontconfig.cpp # Flags passed to both C and C++ files. @@ -433,6 +437,7 @@ MY_DEFS := \ '-DNO_TCMALLOC' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ + '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_GPU=1' \ @@ -458,6 +463,7 @@ MY_DEFS := \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_DEFAULT_FONT_CACHE_LIMIT=(8*1024*1024)' \ '-DUSE_CHROMIUM_SKIA' \ + '-DSK_IGNORE_MAC_TEXT_BOUNDS_FIX' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -493,11 +499,11 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/third_party/skia/src/gpu \ $(LOCAL_PATH)/third_party/expat/files/lib \ $(LOCAL_PATH)/third_party/zlib \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/expat/lib \ + $(PWD)/external/expat/lib \ $(LOCAL_PATH)/third_party/freetype/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/frameworks/wilhelm/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/bionic \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/stlport/stlport + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES) diff --git a/skia/skia.target.linux-arm.mk b/skia/skia.target.linux-arm.mk index 28d33a5e46..5cd5dadd46 100644 --- a/skia/skia.target.linux-arm.mk +++ b/skia/skia.target.linux-arm.mk @@ -68,10 +68,10 @@ LOCAL_SRC_FILES := \ third_party/skia/src/core/SkPaintOptionsAndroid.cpp \ third_party/skia/src/images/SkScaledBitmapSampler.cpp \ third_party/skia/src/ports/SkPurgeableMemoryBlock_none.cpp \ - third_party/skia/src/ports/FontHostConfiguration_android.cpp \ + third_party/skia/src/ports/SkFontConfigInterface_android.cpp \ third_party/skia/src/ports/SkFontHost_FreeType.cpp \ third_party/skia/src/ports/SkFontHost_FreeType_common.cpp \ - third_party/skia/src/ports/SkFontHost_android.cpp \ + third_party/skia/src/ports/SkFontConfigParser_android.cpp \ third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp \ third_party/skia/src/ports/SkOSFile_stdio.cpp \ third_party/skia/src/ports/SkThread_pthread.cpp \ @@ -98,6 +98,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/core/SkBitmapHeap.cpp \ third_party/skia/src/core/SkBitmapProcShader.cpp \ third_party/skia/src/core/SkBitmapProcState.cpp \ + third_party/skia/src/core/SkBitmapProcBicubic.cpp \ third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp \ third_party/skia/src/core/SkBitmap_scroll.cpp \ third_party/skia/src/core/SkBlitMask_D32.cpp \ @@ -130,6 +131,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/core/SkDeviceProfile.cpp \ third_party/skia/src/core/SkDither.cpp \ third_party/skia/src/core/SkDraw.cpp \ + third_party/skia/src/core/SkDrawLooper.cpp \ third_party/skia/src/core/SkEdgeBuilder.cpp \ third_party/skia/src/core/SkEdgeClipper.cpp \ third_party/skia/src/core/SkEdge.cpp \ @@ -278,6 +280,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/effects/SkKernel33MaskFilter.cpp \ third_party/skia/src/effects/SkLayerDrawLooper.cpp \ third_party/skia/src/effects/SkLayerRasterizer.cpp \ + third_party/skia/src/effects/SkLerpXfermode.cpp \ third_party/skia/src/effects/SkLightingImageFilter.cpp \ third_party/skia/src/effects/SkMatrixConvolutionImageFilter.cpp \ third_party/skia/src/effects/SkMergeImageFilter.cpp \ @@ -383,7 +386,8 @@ LOCAL_SRC_FILES := \ third_party/skia/src/gpu/SkGrTexturePixelRef.cpp \ third_party/skia/src/image/SkImage_Gpu.cpp \ third_party/skia/src/image/SkSurface_Gpu.cpp \ - third_party/skia/src/gpu/gl/SkGLContextHelper.cpp + third_party/skia/src/gpu/gl/SkGLContextHelper.cpp \ + third_party/skia/src/ports/SkFontHost_fontconfig.cpp # Flags passed to both C and C++ files. @@ -430,6 +434,7 @@ MY_DEFS := \ '-DNO_TCMALLOC' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ + '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_GPU=1' \ @@ -455,6 +460,7 @@ MY_DEFS := \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_DEFAULT_FONT_CACHE_LIMIT=(8*1024*1024)' \ '-DUSE_CHROMIUM_SKIA' \ + '-DSK_IGNORE_MAC_TEXT_BOUNDS_FIX' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -490,11 +496,11 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/third_party/skia/src/gpu \ $(LOCAL_PATH)/third_party/expat/files/lib \ $(LOCAL_PATH)/third_party/zlib \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/expat/lib \ + $(PWD)/external/expat/lib \ $(LOCAL_PATH)/third_party/freetype/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/frameworks/wilhelm/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/bionic \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/stlport/stlport + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES) diff --git a/skia/skia.target.linux-x86.mk b/skia/skia.target.linux-x86.mk index ccbc71b9cd..c4fbcfb857 100644 --- a/skia/skia.target.linux-x86.mk +++ b/skia/skia.target.linux-x86.mk @@ -69,10 +69,10 @@ LOCAL_SRC_FILES := \ third_party/skia/src/images/SkScaledBitmapSampler.cpp \ third_party/skia/src/opts/opts_check_SSE2.cpp \ third_party/skia/src/ports/SkPurgeableMemoryBlock_none.cpp \ - third_party/skia/src/ports/FontHostConfiguration_android.cpp \ + third_party/skia/src/ports/SkFontConfigInterface_android.cpp \ third_party/skia/src/ports/SkFontHost_FreeType.cpp \ third_party/skia/src/ports/SkFontHost_FreeType_common.cpp \ - third_party/skia/src/ports/SkFontHost_android.cpp \ + third_party/skia/src/ports/SkFontConfigParser_android.cpp \ third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp \ third_party/skia/src/ports/SkOSFile_stdio.cpp \ third_party/skia/src/ports/SkThread_pthread.cpp \ @@ -99,6 +99,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/core/SkBitmapHeap.cpp \ third_party/skia/src/core/SkBitmapProcShader.cpp \ third_party/skia/src/core/SkBitmapProcState.cpp \ + third_party/skia/src/core/SkBitmapProcBicubic.cpp \ third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp \ third_party/skia/src/core/SkBitmap_scroll.cpp \ third_party/skia/src/core/SkBlitMask_D32.cpp \ @@ -131,6 +132,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/core/SkDeviceProfile.cpp \ third_party/skia/src/core/SkDither.cpp \ third_party/skia/src/core/SkDraw.cpp \ + third_party/skia/src/core/SkDrawLooper.cpp \ third_party/skia/src/core/SkEdgeBuilder.cpp \ third_party/skia/src/core/SkEdgeClipper.cpp \ third_party/skia/src/core/SkEdge.cpp \ @@ -279,6 +281,7 @@ LOCAL_SRC_FILES := \ third_party/skia/src/effects/SkKernel33MaskFilter.cpp \ third_party/skia/src/effects/SkLayerDrawLooper.cpp \ third_party/skia/src/effects/SkLayerRasterizer.cpp \ + third_party/skia/src/effects/SkLerpXfermode.cpp \ third_party/skia/src/effects/SkLightingImageFilter.cpp \ third_party/skia/src/effects/SkMatrixConvolutionImageFilter.cpp \ third_party/skia/src/effects/SkMergeImageFilter.cpp \ @@ -384,7 +387,8 @@ LOCAL_SRC_FILES := \ third_party/skia/src/gpu/SkGrTexturePixelRef.cpp \ third_party/skia/src/image/SkImage_Gpu.cpp \ third_party/skia/src/image/SkSurface_Gpu.cpp \ - third_party/skia/src/gpu/gl/SkGLContextHelper.cpp + third_party/skia/src/gpu/gl/SkGLContextHelper.cpp \ + third_party/skia/src/ports/SkFontHost_fontconfig.cpp # Flags passed to both C and C++ files. @@ -433,6 +437,7 @@ MY_DEFS := \ '-DNO_TCMALLOC' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ + '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_GPU=1' \ @@ -458,6 +463,7 @@ MY_DEFS := \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_DEFAULT_FONT_CACHE_LIMIT=(8*1024*1024)' \ '-DUSE_CHROMIUM_SKIA' \ + '-DSK_IGNORE_MAC_TEXT_BOUNDS_FIX' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -493,11 +499,11 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/third_party/skia/src/gpu \ $(LOCAL_PATH)/third_party/expat/files/lib \ $(LOCAL_PATH)/third_party/zlib \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/expat/lib \ + $(PWD)/external/expat/lib \ $(LOCAL_PATH)/third_party/freetype/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/frameworks/wilhelm/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/bionic \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/stlport/stlport + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES) diff --git a/skia/skia_opts.target.darwin-arm.mk b/skia/skia_opts.target.darwin-arm.mk index 791874b917..dddbf458f5 100644 --- a/skia/skia_opts.target.darwin-arm.mk +++ b/skia/skia_opts.target.darwin-arm.mk @@ -73,6 +73,7 @@ MY_DEFS := \ '-DNO_TCMALLOC' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ + '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_GPU=1' \ @@ -103,9 +104,9 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/third_party/skia/include/pathops \ $(LOCAL_PATH)/third_party/skia/include/utils \ $(LOCAL_PATH)/third_party/skia/src/core \ - $(GYP_ABS_ANDROID_TOP_DIR)/frameworks/wilhelm/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/bionic \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/stlport/stlport + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES) diff --git a/skia/skia_opts.target.darwin-x86.mk b/skia/skia_opts.target.darwin-x86.mk index e507554e13..a28619b5b6 100644 --- a/skia/skia_opts.target.darwin-x86.mk +++ b/skia/skia_opts.target.darwin-x86.mk @@ -78,6 +78,7 @@ MY_DEFS := \ '-DNO_TCMALLOC' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ + '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_GPU=1' \ @@ -108,9 +109,9 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/third_party/skia/include/pathops \ $(LOCAL_PATH)/third_party/skia/include/utils \ $(LOCAL_PATH)/third_party/skia/src/core \ - $(GYP_ABS_ANDROID_TOP_DIR)/frameworks/wilhelm/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/bionic \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/stlport/stlport + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES) diff --git a/skia/skia_opts.target.linux-arm.mk b/skia/skia_opts.target.linux-arm.mk index 791874b917..dddbf458f5 100644 --- a/skia/skia_opts.target.linux-arm.mk +++ b/skia/skia_opts.target.linux-arm.mk @@ -73,6 +73,7 @@ MY_DEFS := \ '-DNO_TCMALLOC' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ + '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_GPU=1' \ @@ -103,9 +104,9 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/third_party/skia/include/pathops \ $(LOCAL_PATH)/third_party/skia/include/utils \ $(LOCAL_PATH)/third_party/skia/src/core \ - $(GYP_ABS_ANDROID_TOP_DIR)/frameworks/wilhelm/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/bionic \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/stlport/stlport + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES) diff --git a/skia/skia_opts.target.linux-x86.mk b/skia/skia_opts.target.linux-x86.mk index e507554e13..a28619b5b6 100644 --- a/skia/skia_opts.target.linux-x86.mk +++ b/skia/skia_opts.target.linux-x86.mk @@ -78,6 +78,7 @@ MY_DEFS := \ '-DNO_TCMALLOC' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ + '-DENABLE_DOUBLE_RESOURCE_LOAD_TIMING' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_GPU=1' \ @@ -108,9 +109,9 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/third_party/skia/include/pathops \ $(LOCAL_PATH)/third_party/skia/include/utils \ $(LOCAL_PATH)/third_party/skia/src/core \ - $(GYP_ABS_ANDROID_TOP_DIR)/frameworks/wilhelm/include \ - $(GYP_ABS_ANDROID_TOP_DIR)/bionic \ - $(GYP_ABS_ANDROID_TOP_DIR)/external/stlport/stlport + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES) diff --git a/skia/skia_test_expectations.txt b/skia/skia_test_expectations.txt index b71399ba94..9e4005496f 100644 --- a/skia/skia_test_expectations.txt +++ b/skia/skia_test_expectations.txt @@ -48,18 +48,16 @@ # # START OVERRIDES HERE -# In r8961 the way Skia draws rotated rects was changed. This resulted -# in a change to the following -crbug.com/237634 virtual/gpu/fast/canvas/image-pattern-rotate.html [ ImageOnlyFailure ] -crbug.com/237634 virtual/gpu/fast/canvas/image-object-in-canvas.html [ ImageOnlyFailure ] +# the new image is better and results from improved AA ellipse drawing +# implemented in r9162 (https://chromiumcodereview.appspot.com/14938004) +crbug.com/241761 virtual/gpu/fast/canvas/canvas-composite-transformclip.html [ ImageOnlyFailure ] -# Font metric calculations were fixed in r9005 -crbug.com/238630 css2.1/t100801-c548-ln-ht-02-b-ag.html [ Failure ] +# Skia r9262 (don't overclamp cubics (see skbug.com/1316)) changed +# the way curves are drawn. The changes to this image are imperceptible +crbug.com/243726 svg/as-background-image/svg-as-background-6.html [ ImageOnlyFailure ] -# Windows font metric handling has changed -crbug.com/239436 svg/batik/text/textEffect3.svg [ ImageOnlyFailure ] -crbug.com/239436 svg/transforms/animated-path-inside-transformed-html.xhtml [ ImageOnlyFailure ] -crbug.com/239436 svg/transforms/text-with-pattern-inside-transformed-html.xhtml [ ImageOnlyFailure ] -crbug.com/239436 svg/transforms/text-with-pattern-with-svg-transform.svg [ ImageOnlyFailure ] +# Skia r9279 improved hairline rendering of quadratics and slightly +# changed this layout test +crbug.com/244401 virtual/gpu/fast/canvas/quadraticCurveTo.xml [ ImageOnlyFailure ] # END OVERRIDES HERE (this line ensures that the file is newline-terminated) |