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

Issue 1497543004: ui/gfx: Add MapRect and ExtractScale skia helper functions. (Closed)

Created:
5 years ago by vmpstr
Modified:
5 years ago
Reviewers:
danakj
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ui/gfx: Add MapRect and ExtractScale skia helper functions. This patch adds two helper functions: MapRect - Applies the given matrix to the given rect and returns the result ExtractScale - Extracts the scale components of the matrix if it is able to do. Returns true on success and false on failure. R=danakj@chromium.org

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -0 lines) Patch
M ui/gfx/skia_util.h View 1 chunk +7 lines, -0 lines 0 comments Download
M ui/gfx/skia_util.cc View 1 chunk +17 lines, -0 lines 1 comment Download

Messages

Total messages: 6 (1 generated)
vmpstr
Please take a look.
5 years ago (2015-12-03 00:04:27 UTC) #1
danakj
https://codereview.chromium.org/1497543004/diff/1/ui/gfx/skia_util.cc File ui/gfx/skia_util.cc (right): https://codereview.chromium.org/1497543004/diff/1/ui/gfx/skia_util.cc#newcode237 ui/gfx/skia_util.cc:237: SkRect MapRect(const SkMatrix& matrix, const SkRect& src) { I ...
5 years ago (2015-12-03 00:12:35 UTC) #2
vmpstr
On 2015/12/03 00:12:35, danakj (behind on reviews) wrote: > https://codereview.chromium.org/1497543004/diff/1/ui/gfx/skia_util.cc > File ui/gfx/skia_util.cc (right): > ...
5 years ago (2015-12-03 00:14:05 UTC) #3
danakj
On Wed, Dec 2, 2015 at 4:14 PM, <vmpstr@chromium.org> wrote: > On 2015/12/03 00:12:35, danakj ...
5 years ago (2015-12-03 00:29:47 UTC) #4
vmpstr
5 years ago (2015-12-03 00:32:06 UTC) #5
On 2015/12/03 00:29:47, danakj (behind on reviews) wrote:
> On Wed, Dec 2, 2015 at 4:14 PM, <mailto:vmpstr@chromium.org> wrote:
> 
> > On 2015/12/03 00:12:35, danakj (behind on reviews) wrote:
> >
> >> https://codereview.chromium.org/1497543004/diff/1/ui/gfx/skia_util.cc
> >> File ui/gfx/skia_util.cc (right):
> >>
> >
> >
> >
> >
>
https://codereview.chromium.org/1497543004/diff/1/ui/gfx/skia_util.cc#newcode237
> >
> >> ui/gfx/skia_util.cc:237: SkRect MapRect(const SkMatrix& matrix, const
> >> SkRect&
> >> src) {
> >> I question why you're using an SkMatrix and not a gfx::Transform.
> >>
> >
> > I know it's a bit awkward to land this without usage, but the use is from
> > within
> > an SkCanvas override. This means I have to work with Skia types, not gfx
> > types.
> >
> 
> I think I'd rather you make them local. This place is good for converting
> to/from gfx types so we don't work directly on skia types. This patch is
> doing the opposite.

Ok thanks for your feedback.

> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "Chromium-reviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698