diff options
author | 2017-01-23 15:51:01 +0000 | |
---|---|---|
committer | 2017-01-23 15:51:14 +0000 | |
commit | 26ecfe0af8da1d17a079e17af85c5c576bfeca84 (patch) | |
tree | ffce62c50685254f0728a711f023b0d1a6792283 /src/core/SkWritePixelsRec.h | |
parent | bfe8dca7dfdd9cafbccba0a637f2fcd58c7a54fb (diff) |
Revert "Refactor trimming logic for read/writePixels()"
This reverts commit 977f64cbfad1ecd7fd4b1231c694c7e828fda1f0.
Reason for revert: Triggering nanobench asserts
Original change's description:
> Refactor trimming logic for read/writePixels()
>
> (1) Move trimming logic into Bitmap/Pixmap level for
> raster. Everything goes through here, so we'll
> only do the work once.
> (2) This means it also goes to GPU level.
> (3) Always use SkReadPixelsRec rather than inlining
> the logic.
> (4) Create an SkWritePixelsRec to encapsulate write
> trimming.
> (5) Disabled kIndex8 as a dst - always.
>
> BUG=skia:6021
>
> Change-Id: I748f50c3b726f7c6de5462e2b1ccb54bc387a510
> Reviewed-on: https://skia-review.googlesource.com/7326
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>
TBR=msarett@google.com,brianosman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6021
Change-Id: If9aacc6ce8b20e3dfe8a0f22ebca653f28356175
Reviewed-on: https://skia-review.googlesource.com/7379
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/core/SkWritePixelsRec.h')
-rw-r--r-- | src/core/SkWritePixelsRec.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/core/SkWritePixelsRec.h b/src/core/SkWritePixelsRec.h deleted file mode 100644 index 652a13a822..0000000000 --- a/src/core/SkWritePixelsRec.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkWritePixelsRec_DEFINED -#define SkWritePixelsRec_DEFINED - -#include "SkImageInfo.h" - -/** - * Helper class to package and trim the parameters passed to writePixels() - */ -struct SkWritePixelsRec { - SkWritePixelsRec(const SkImageInfo& info, const void* pixels, size_t rowBytes, int x, int y) - : fPixels(pixels) - , fRowBytes(rowBytes) - , fInfo(info) - , fX(x) - , fY(y) - {} - - const void* fPixels; - size_t fRowBytes; - SkImageInfo fInfo; - int fX; - int fY; - - /* - * On true, may have modified its fields (except fRowBytes) to make it a legal subset - * of the specified dst width/height. - * - * On false, leaves self unchanged, but indicates that it does not overlap dst, or - * is not valid (e.g. bad fInfo) for writePixels(). - */ - bool trim(int dstWidth, int dstHeight); -}; - -#endif |