skia: Use -fno-strict-aliasing for tests

Tests aren't compatible with strict aliasing rules, and aren't
speed relevant anyway -- use -fno-strict-aliasing

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
skia: Use -fno-strict-aliasing for now

Change-Id: Iced75d8e419ffeee26e478b7716dfcf13e0f53d0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
skia/bench: Use -fno-strict-aliasing

Use -fno-strict-aliasing for the benchmark so we don't have to use
it globally

Change-Id: Ibe5b80587818058cbb4290fe694c0b5d4cdc75a0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Merge remote-tracking branch 'rascarlo/jb-ras-mr1.1' into jb-mr1.1
skia: Don't use -D_FORTIFY_SOURCE=2

SkString uses a dynamic growing mechanism for storing strings.
This dynamic mechanism confuses GCC, which thinks it's operating
with a single character. This causes crashes when we use
Android's -D_FORTIFY_SOURCE=2 extensions.

Consider the following code:

  SkLanguage SkLanguage::getParent() const {
      SkASSERT(fInfo != NULL);
      const char* tag = fInfo->fTag.c_str();
      SkASSERT(tag != NULL);

      // strip off the rightmost "-.*"
      char* parentTagEnd = strrchr(tag, '-');
  [DELETED]
  }

fInfo->fTag is a SkString, which is declared as:

  class SkString {
  public:
  [DELETED]
      size_t      size() const { return (size_t) fRec->fLength; }
      const char* c_str() const { return fRec->data(); }
      char operator[](size_t n) const { return this->c_str()[n]; }
  [DELETED]
  private:
      struct Rec {
      public:
          size_t      fLength;
          int32_t     fRefCnt;
          char        fBeginningOfData;

          char* data() { return &fBeginningOfData; }
          const char* data() const { return &fBeginningOfData; }
      };
      Rec* fRec;
  [DELETED]
  };

When "fInfo->fTag.c_str();" is executed in "SkLanguage::getParent()", it
returns a pointer to fBeginningOfData, which is a single char. The compiler
believes that "tag" always points to an element of size 1. When Android's
strrchr() fortify extensions are called, we trigger an abort, because
strrchr() detects an attempt to read beyond the one character
fBeginningOfData.

Change-Id: Ibe957544b5114c14018630a8f42213bf3dd806e3
Add memcpy optimization pass for Skia samplers.

Adds an optimization to skia samplers that is using memcpy to copy the
pixels when the source and destination is the same size, unscaled, and
unfiltered.

Change-Id: I014db353e880cf09f3f0b17bbe7bcd2cc2d43d80
Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com>
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
Merge https://github.com/ctfrommn/android_external_skia into HEAD