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