1.8X speedup on the Blurs sample, and 2.3X on the BigBlur sample.
We don't need to clear while downsampling, since each step reads only the pixels
written in the previous step. We can avoid destination clears before
convolution by disabling blending. We also don't need to clear when upsampling,
since the upsample step also only reads pixels written by the convolution. The
only clears we then need to do are on each side of the srcRect used for
convolution, and a 1-pixel border for bilinear upsampling. Since our srcRect is
always offset to (0, 0), we only need to clear on the right and bottom.
Review URL: http://codereview.appspot.com/4803048/
git-svn-id: http://skia.googlecode.com/svn/trunk@1941 2bbb7eff-a529-9590-31e7-b0007b416f81
1.8X speedup on the Blurs sample, and 2.3X on the BigBlur sample.
We don't need to clear while downsampling, since each step reads only the pixels
written in the previous step. We can avoid destination clears before
convolution by disabling blending. We also don't need to clear when upsampling,
since the upsample step also only reads pixels written by the convolution. The
only clears we then need to do are on each side of the srcRect used for
convolution. Since our srcRect is always offset to (0, 0), we only need to
clear on the right and bottom.
Review URL: http://codereview.appspot.com/4803048/
git-svn-id: http://skia.googlecode.com/svn/trunk@1937 2bbb7eff-a529-9590-31e7-b0007b416f81
we're writing to it, then restore the onscreen clip when copying it back
to screen. Speeds up rendering of web pages with paths >> tile size.
git-svn-id: http://skia.googlecode.com/svn/trunk@1899 2bbb7eff-a529-9590-31e7-b0007b416f81
- convolveRect() is too low-level; made it private and exposed convolveInX() and
convolveInY() instead
- added GrAutoTextureEntry to automatically unlock a texture entry
- the clipping and bounder checks were returning false from
drawWithGPUMaskFilter(), causing the software blur to kick in; return true
instead
- the Windows build was giving a spurious warning about reading an uninitialized
variable; rearrange the code to fix it
Review URL: http://codereview.appspot.com/4710042/
git-svn-id: http://skia.googlecode.com/svn/trunk@1842 2bbb7eff-a529-9590-31e7-b0007b416f81
This is a first stab at implementing a GPU-based
Gaussian blur in Ganesh. The convolution shader is implemented as a new
filtering mode. There are several known issues:
- no support for blur types other than "normal"
- FBO truncation problem at high zoom values
- uses bilinear for upsampling instead of Mitchell
Review URL: http://codereview.appspot.com/4645082/
git-svn-id: http://skia.googlecode.com/svn/trunk@1830 2bbb7eff-a529-9590-31e7-b0007b416f81
New macros called in Ganesh functions; by default are compiled away,
in example code resolve to printout, and are compatible with WebKit/Chromium
event logging and GPU profiler.
git-svn-id: http://skia.googlecode.com/svn/trunk@1770 2bbb7eff-a529-9590-31e7-b0007b416f81
Volatility is a hint that indicates that the contents of a bitmap
are ephemeral. SkGpuDevice will not preserve volatile bitmaps
in its texture cache, and will use textures from a pool of
keyless (recyclable) textures to avoid the performance hit of
texture allocation and release.
A subsequent change is required in webkit in order to take advantage
of this optimization. putImageData, and other methods that create
temporary bitmaps will have to mark their bitmaps as volatile.
before rendering them through skia.
git-svn-id: http://skia.googlecode.com/svn/trunk@1769 2bbb7eff-a529-9590-31e7-b0007b416f81
Put in framework for changing curve subdivision tolerance when rendering
offscreen AA tiles; however, comment out actual tolerance changes because
of possible quality issues with simple circles (q.v. Arcs slide of SampleApp).
git-svn-id: http://skia.googlecode.com/svn/trunk@1702 2bbb7eff-a529-9590-31e7-b0007b416f81
better match the fonts produced by CoreText on OS/X.
M include/config/SkUserConfig.h
M include/core/SkMask.h
M include/core/SkScalerContext.h
M src/core/SkBlitter_ARGB32.cpp
M src/core/SkScalerContext.cpp
M src/core/SkPaint.cpp
M src/gpu/SkGrFontScaler.cpp
M src/ports/SkFontHost_mac_coretext.cpp
M src/ports/SkFontHost_mac.cpp
M gpu/include/GrTypes.h
M gpu/src/GrAtlas.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@1672 2bbb7eff-a529-9590-31e7-b0007b416f81
Default all architectures to kProbe_GrGLCapability.
Use new facilities better from GrGpuGL.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@1613 2bbb7eff-a529-9590-31e7-b0007b416f81
Create a symbolic name for -1 when it means "don't know, probe at runtime".
git-svn-id: http://skia.googlecode.com/svn/trunk@1606 2bbb7eff-a529-9590-31e7-b0007b416f81