Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6)

Issue 6049046: fix error when mask filter is used with drawBitmapRect (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by guanqun
Modified:
12 years, 4 months ago
Reviewers:
junov, bsalomon, junov1, reed1
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

fix error when mask filter is used with drawBitmapRect BUG= TEST=

Patch Set 1 #

Patch Set 2 : new fix #

Patch Set 3 : fixup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -0 lines) Patch
M gm/drawbitmaprect.cpp View 1 3 chunks +36 lines, -0 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 12
guanqun
Hunting the bug for one day, and finally I got some clues: the first texture's ...
12 years, 4 months ago (2012-04-17 07:56:04 UTC) #1
reed1
gm change lgtm
12 years, 4 months ago (2012-04-17 12:34:39 UTC) #2
bsalomon
On 2012/04/17 12:34:39, reed1 wrote: > gm change lgtm Guanqun, do you have a repro ...
12 years, 4 months ago (2012-04-17 13:03:03 UTC) #3
guanqun
On 2012/04/17 13:03:03, bsalomon wrote: > On 2012/04/17 12:34:39, reed1 wrote: > > gm change ...
12 years, 4 months ago (2012-04-18 05:39:48 UTC) #4
guanqun
Adding junov who added that part of code in SkGpuDevice::drawBitmap() According to my understanding, GrContext's ...
12 years, 4 months ago (2012-04-24 04:50:04 UTC) #5
junov1
I don't think this is the right fix for this problem. I think the problem ...
12 years, 4 months ago (2012-04-24 14:03:10 UTC) #6
guanqun.lu_gmail.com
On Tue, Apr 24, 2012 at 10:03 PM, <junov@chromium.org> wrote: > GrMatrix ivm = context->getMatrix(); ...
12 years, 4 months ago (2012-04-24 14:20:04 UTC) #7
bsalomon
On 2012/04/24 14:20:04, guanqun.lu_gmail.com wrote: > On Tue, Apr 24, 2012 at 10:03 PM, <mailto:junov@chromium.org> ...
12 years, 4 months ago (2012-04-24 14:50:34 UTC) #8
junov1
On 2012/04/24 14:20:04, guanqun.lu_gmail.com wrote: > On Tue, Apr 24, 2012 at 10:03 PM, <mailto:junov@chromium.org> ...
12 years, 4 months ago (2012-04-24 14:50:46 UTC) #9
guanqun
On 2012/04/24 14:50:46, junov1 wrote: > Yes, I think your first patch was a better ...
12 years, 4 months ago (2012-04-24 15:06:12 UTC) #10
junov1
On 2012/04/24 15:06:12, guanqun wrote: > On 2012/04/24 14:50:46, junov1 wrote: > > Yes, I ...
12 years, 4 months ago (2012-04-24 19:26:56 UTC) #11
bsalomon
12 years, 4 months ago (2012-04-25 15:52:55 UTC) #12
On 2012/04/24 19:26:56, junov1 wrote:
> On 2012/04/24 15:06:12, guanqun wrote:
> > On 2012/04/24 14:50:46, junov1 wrote:
> > > Yes, I think your first patch was a better solution.  In general, context
> > > objects should store persistent state, while temporary objects like the
> SkDraw
> > > in this case are more appropriate for storing temporary state adjustments.

> > 
> > Wow, it's interesting to see you and Brian have different opinions on this
> one.
> > :)
> > 
> > Personally, I like my latest patchset, because it's kind of more harmony
"both
> > have the same matrix"...
> > 
> > Quoting:
> > "context objects should store persistent state"
> > 
> > I have a question about your statement, I've seen lots of places where we
set
> > the matrix in GrContext to identity and do the drawing afterwards. Is this
> > behaviour contrary to persistent philosophy?
> 
> Yeah, I was discussing this with Brian earlier. There are some deeper design
> flaws that need to be addressed.  He will come back to you with a more sound
> proposal.
> 
> It's confusing that we have two different places where we store the view
matrix.
>  Even more confusing when the two are not synchronized.  Right now, the SkDraw
> is the vehicle used by SkCanvas to communicate drawing state tweaks to the
> SkDevice when we are using certain types of effects (like SkBlurMaskFilter). 
> Therefore, the state expressed in the SkDraw must override the state stored in
> GrContext.  That begs the question: why do we even store a matrix in GrContext
> then?  
> 
> I take back what I said about GrContext storing persistent state. SkCanvas is
> the place where persistent matrix and clipping state are kept.
> 
> For what it's worth I think the latest patch set fails to fix the same problem
> with drawRect and drawPath, while the first patch fixed all cases.

I landed the first patch and filed a bug about the deeper problem:
http://code.google.com/p/skia/issues/detail?id=586.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b