Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(872)

Issue 1668033002: don't get dismayed by negative scales for HQ (Closed)

Created:
4 years, 10 months ago by reed1
Modified:
4 years, 10 months ago
Reviewers:
vmpstr2, f(malita), vmpstr
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 1

Patch Set 2 : add guard #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -1 line) Patch
M src/core/SkBitmapController.cpp View 1 2 chunks +10 lines, -1 line 1 comment Download

Messages

Total messages: 24 (11 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1668033002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1668033002/1
4 years, 10 months ago (2016-02-04 00:54:00 UTC) #3
reed1
4 years, 10 months ago (2016-02-04 00:54:30 UTC) #5
vmpstr
lgtm https://codereview.chromium.org/1668033002/diff/1/src/core/SkBitmapController.cpp File src/core/SkBitmapController.cpp (right): https://codereview.chromium.org/1668033002/diff/1/src/core/SkBitmapController.cpp#newcode101 src/core/SkBitmapController.cpp:101: invScaleX = SkScalarAbs(invScaleX); This is the only bit ...
4 years, 10 months ago (2016-02-04 00:59:05 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-04 01:20:03 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1668033002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1668033002/20001
4 years, 10 months ago (2016-02-04 01:44:50 UTC) #12
f(malita)
lgtm
4 years, 10 months ago (2016-02-04 02:10:12 UTC) #13
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-04 02:12:39 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1668033002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1668033002/20001
4 years, 10 months ago (2016-02-04 03:07:20 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/a3d99a515bb379b60c38189de435b47bdc8dd528
4 years, 10 months ago (2016-02-04 03:07:58 UTC) #20
vmpstr
https://codereview.chromium.org/1668033002/diff/20001/src/core/SkBitmapController.cpp File src/core/SkBitmapController.cpp (right): https://codereview.chromium.org/1668033002/diff/20001/src/core/SkBitmapController.cpp#newcode68 src/core/SkBitmapController.cpp:68: SkScalar invScaleSqr = invMat.getScaleX() * invMat.getScaleY(); I forgot to ...
4 years, 10 months ago (2016-02-04 17:56:07 UTC) #21
reed1
On 2016/02/04 17:56:07, vmpstr wrote: > https://codereview.chromium.org/1668033002/diff/20001/src/core/SkBitmapController.cpp > File src/core/SkBitmapController.cpp (right): > > https://codereview.chromium.org/1668033002/diff/20001/src/core/SkBitmapController.cpp#newcode68 > ...
4 years, 10 months ago (2016-02-04 19:38:58 UTC) #22
vmpstr
On 2016/02/04 19:38:58, reed1 wrote: > On 2016/02/04 17:56:07, vmpstr wrote: > > > https://codereview.chromium.org/1668033002/diff/20001/src/core/SkBitmapController.cpp ...
4 years, 10 months ago (2016-02-04 20:01:31 UTC) #23
reed1
4 years, 10 months ago (2016-02-04 21:02:01 UTC) #24
Message was sent while issue was closed.
On 2016/02/04 20:01:31, vmpstr wrote:
> On 2016/02/04 19:38:58, reed1 wrote:
> > On 2016/02/04 17:56:07, vmpstr wrote:
> > >
> >
>
https://codereview.chromium.org/1668033002/diff/20001/src/core/SkBitmapContro...
> > > File src/core/SkBitmapController.cpp (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/1668033002/diff/20001/src/core/SkBitmapContro...
> > > src/core/SkBitmapController.cpp:68: SkScalar invScaleSqr =
> invMat.getScaleX()
> > *
> > > invMat.getScaleY();
> > > I forgot to mention this, but there's another small issue here with
> rotations.
> > > If we have a rotated image (but otherwise unscaled), then these scales are
> not
> > > correct. It again doesn't really affect much since it only changes the
> > perceived
> > > amount that the decode requires, but maybe we can rework this and reuse
the
> > > scales we get in processHQRequest instead.
> > 
> > The scales from decomposeScale are wrong? Can you show an example? I tried
> this
> > test, and always got 1,1 for the scales...
> > 
> >     for (int i = 0; i < 360; i += 5) {
> >         SkSize scale;
> >         SkMatrix m;
> >         m.setRotate(i, 0, 0);
> >         m.decomposeScale(&scale);
> >         SkDebugf("rotate %d scale [%g %g]\n", i, scale.width(),
> scale.height());
> >     }
> 
> Nono, decompose scale gives us the correct answer. However, we're not using
> decompose scale in cache_size_ok, we're just getting the getScaleX() and
> getScaleY() components of the matrix. My proposal is to maybe reuse the
> decompose scale that we get instead.

Ah, gotcha. I agree we should use the same logic to compute the width/height in
both places. Will fix.

Powered by Google App Engine
This is Rietveld 408576698