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

Issue 188403003: Add API for GrContext to recommend rendertarget sample count (Closed)

Created:
6 years, 9 months ago by Kimmo Kinnunen
Modified:
6 years, 9 months ago
Reviewers:
bsalomon
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@skpathobject
Visibility:
Public.

Description

Add API for GrContext to recommend rendertarget sample count Add GrContext::getRecommendedSampleCount method that can be used to determine which GPU backend and what exact sample count is recommendeded for a particular render target at particular dpi. Make this initially recommend 4xMSAA for contexts which have NVPR enabled if dpi is 250 or more, 16 if dpi is less than 250 and no MSAA for others. BUG=chromium:347962 Committed: http://code.google.com/p/skia/source/detail?r=13717

Patch Set 1 #

Total comments: 1

Patch Set 2 : address review comments #

Patch Set 3 : address review comments #

Total comments: 1

Patch Set 4 : address review commetns #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -0 lines) Patch
M include/gpu/GrContext.h View 1 chunk +13 lines, -0 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Kimmo Kinnunen
How about this? The Chromium call site patch is: https://chromiumcodereview.appspot.com/184573002/
6 years, 9 months ago (2014-03-06 07:15:31 UTC) #1
bsalomon
the interface looks good https://codereview.chromium.org/188403003/diff/1/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): https://codereview.chromium.org/188403003/diff/1/src/gpu/GrContext.cpp#newcode1709 src/gpu/GrContext.cpp:1709: return 4; Should probably also ...
6 years, 9 months ago (2014-03-06 14:02:43 UTC) #2
Kimmo Kinnunen
new version
6 years, 9 months ago (2014-03-07 13:00:22 UTC) #3
bsalomon
https://codereview.chromium.org/188403003/diff/40001/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): https://codereview.chromium.org/188403003/diff/40001/src/gpu/GrContext.cpp#newcode1718 src/gpu/GrContext.cpp:1718: return GrMin(fGpu->caps()->maxSampleCount(), chosenSampleCount); maybe: return chosenSampleCount < fGpu->caps()->maxSampleCount() ? ...
6 years, 9 months ago (2014-03-07 18:35:36 UTC) #4
Kimmo Kinnunen
On 2014/03/07 18:35:36, bsalomon wrote: > maybe: > > return chosenSampleCount < fGpu->caps()->maxSampleCount() ? chosenSampleCount ...
6 years, 9 months ago (2014-03-10 07:24:33 UTC) #5
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 9 months ago (2014-03-10 07:25:03 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/188403003/60001
6 years, 9 months ago (2014-03-10 07:25:12 UTC) #7
commit-bot: I haz the power
Change committed as 13717
6 years, 9 months ago (2014-03-10 07:40:07 UTC) #8
bsalomon
6 years, 9 months ago (2014-03-10 14:00:02 UTC) #9
Message was sent while issue was closed.
On 2014/03/10 07:24:33, kkinnunen wrote:
> On 2014/03/07 18:35:36, bsalomon wrote:
> > maybe:
> > 
> > return chosenSampleCount < fGpu->caps()->maxSampleCount() ?
chosenSampleCount
> :
> > 0
> > 
> > ?
> > 
> > I think we should not recommend MSAA if we can't meet some min AA quality
bar.
> 
> Did you mean "less than max sample count" or "less or equal to max sample
count"
> ?
> 
> I assumed the latter. If that was incorrect, I should fix it in a later
commit.

Yes, you're right.

Powered by Google App Engine
This is Rietveld 408576698