Commit Graph

304 Commits

Author SHA1 Message Date
bsalomon@google.com
eefe6f1eef Fix crash in GrStencilBuffer when it tries to unlock itself but has lost its GrGpu ptr.
Review URL: http://codereview.appspot.com/4810088/



git-svn-id: http://skia.googlecode.com/svn/trunk@2084 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-09 17:57:12 +00:00
bsalomon@google.com
8ccadddfa7 Increase default cache size
Review URL: http://codereview.appspot.com/4810087/


git-svn-id: http://skia.googlecode.com/svn/trunk@2083 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-09 16:49:03 +00:00
bsalomon@google.com
a44f7003e5 Fix some ref leaks
Review URL: http://codereview.appspot.com/4837068/



git-svn-id: http://skia.googlecode.com/svn/trunk@2082 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-09 15:30:41 +00:00
bsalomon@google.com
d4777d9294 Remove unnecessary header include.
git-svn-id: http://skia.googlecode.com/svn/trunk@2080 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-09 14:15:20 +00:00
bsalomon@google.com
f6ff4951f7 Fix sb/rt size computation
Review URL: http://codereview.appspot.com/4809087/



git-svn-id: http://skia.googlecode.com/svn/trunk@2079 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-09 13:32:14 +00:00
bsalomon@google.com
ab15d618ae fix bug in r2077
git-svn-id: http://skia.googlecode.com/svn/trunk@2078 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-09 12:57:56 +00:00
bsalomon@google.com
9c6e3af89f Suppress uninit warning.
git-svn-id: http://skia.googlecode.com/svn/trunk@2077 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-09 12:55:53 +00:00
bsalomon@google.com
558a75bcb3 Use a single stencil buffer for a given width,height,samplecount
Review URL: http://codereview.appspot.com/4854044/


git-svn-id: http://skia.googlecode.com/svn/trunk@2061 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-08 17:01:14 +00:00
bsalomon@google.com
0168afc719 Make RT & TEX base classes aware of NPOT/min-RT bloated size
Review URL: http://codereview.appspot.com/4849045/


git-svn-id: http://skia.googlecode.com/svn/trunk@2057 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-08 13:21:05 +00:00
bsalomon@google.com
6513cd06ae Fail draws when can't get geom into vb/ib.
Review URL: http://codereview.appspot.com/4837059/



git-svn-id: http://skia.googlecode.com/svn/trunk@2053 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-05 20:12:30 +00:00
bsalomon@google.com
82866fd5a7 Fail path rendering gracefully when vb/ib space alloc fails
Review URL: http://codereview.appspot.com/4839050/



git-svn-id: http://skia.googlecode.com/svn/trunk@2052 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-05 16:27:32 +00:00
bsalomon@google.com
edc177df61 Fixes for iOS / Ganesh (consistent fs/vs uni precision decl and don't use stencil-only fbo for clear)
Review URL: http://codereview.appspot.com/4850043/


git-svn-id: http://skia.googlecode.com/svn/trunk@2050 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-05 15:46:40 +00:00
bsalomon@google.com
c7e6d08fd2 Fix dumb copy/paste error
git-svn-id: http://skia.googlecode.com/svn/trunk@2049 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-05 15:38:49 +00:00
bsalomon@google.com
a5a1da81d0 Handle recursive call into GrResourceCache::purgeAsNeeded
Review URL: http://codereview.appspot.com/4850042/



git-svn-id: http://skia.googlecode.com/svn/trunk@2046 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-05 14:02:41 +00:00
bsalomon@google.com
81c3f8de1c Add GrStencilBuffer as a separate resource type from render target
This is a resubmission of the changes in r2026 with fixes for FBO completeness issues.

Review URL: http://codereview.appspot.com/4837046/


git-svn-id: http://skia.googlecode.com/svn/trunk@2035 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-03 15:18:33 +00:00
bsalomon@google.com
c49d66b04e Add glReadBuffer to GrGLInterface.
Review URL: http://codereview.appspot.com/4841048/





git-svn-id: http://skia.googlecode.com/svn/trunk@2034 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-03 14:22:30 +00:00
bsalomon@google.com
d32c5f564e Add glDrawBuffer(s) to GrGLInterface
Review URL: http://codereview.appspot.com/4841046/



git-svn-id: http://skia.googlecode.com/svn/trunk@2032 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-02 19:29:03 +00:00
bsalomon@google.com
4737082f79 Correct check against GR_USE_PLATFORM_CREATE_SAMPLE_COUNT
Review URL: http://codereview.appspot.com/4830053/


git-svn-id: http://skia.googlecode.com/svn/trunk@2028 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-02 15:29:38 +00:00
bsalomon@google.com
4043ae2061 Revert r2026 due to bot failures
git-svn-id: http://skia.googlecode.com/svn/trunk@2027 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-02 14:19:11 +00:00
bsalomon@google.com
a16d6506bd Create a separate GrStencilBuffer class apart from GrRenderTarget.
Review URL: http://codereview.appspot.com/4837046/



git-svn-id: http://skia.googlecode.com/svn/trunk@2026 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-02 14:07:52 +00:00
yangsu@google.com
e938b19445 iOS SampleApp menu related changes
git-svn-id: http://skia.googlecode.com/svn/trunk@2023 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-02 13:23:15 +00:00
bsalomon@google.com
030302ce69 Fix comment alignment
git-svn-id: http://skia.googlecode.com/svn/trunk@2014 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-01 17:35:01 +00:00
bsalomon@google.com
dea2f8d863 Remove unnecessary dirty clip flag in GrGpu, remove getUsableStencilBits()
Review URL: http://codereview.appspot.com/4828050/



git-svn-id: http://skia.googlecode.com/svn/trunk@2011 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-01 15:51:05 +00:00
bsalomon@google.com
71f341aca6 Split texture upload out from onCreateTexture
Review URL: http://codereview.appspot.com/4809060/



git-svn-id: http://skia.googlecode.com/svn/trunk@2003 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-01 13:36:00 +00:00
bsalomon@google.com
5bfc21761e cleanup GrGLTexture / GrGLRenderTarget cons. Make GrRenderTarget aware of its msaa sample count.
Review URL: http://codereview.appspot.com/4833045/



git-svn-id: http://skia.googlecode.com/svn/trunk@1996 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-29 20:29:05 +00:00
bsalomon@google.com
aa5b6730f2 move render target decls / defs to their own headers / srcs
Review URL: http://codereview.appspot.com/4806058/



git-svn-id: http://skia.googlecode.com/svn/trunk@1995 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-29 15:13:20 +00:00
tomhudson@google.com
2c2508d2ed More variable initializations and curly braces to avoid Linux compiler
warnings.



git-svn-id: http://skia.googlecode.com/svn/trunk@1993 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-29 13:44:30 +00:00
bsalomon@google.com
e14490adad Move GL headers out of public include dir
Review URL: http://codereview.appspot.com/4837041/



git-svn-id: http://skia.googlecode.com/svn/trunk@1992 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-29 13:39:53 +00:00
epoger@google.com
ec3ed6a5eb Automatic update of all copyright notices to reflect new license terms.
I have manually examined all of these diffs and restored a few files that
seem to require manual adjustment.

The following files still need to be modified manually, in a separate CL:

android_sample/SampleApp/AndroidManifest.xml
android_sample/SampleApp/res/layout/layout.xml
android_sample/SampleApp/res/menu/sample.xml
android_sample/SampleApp/res/values/strings.xml
android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java
android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java
experimental/CiCarbonSampleMain.c
experimental/CocoaDebugger/main.m
experimental/FileReaderApp/main.m
experimental/SimpleCocoaApp/main.m
experimental/iOSSampleApp/Shared/SkAlertPrompt.h
experimental/iOSSampleApp/Shared/SkAlertPrompt.m
experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig
gpu/src/android/GrGLDefaultInterface_android.cpp
gyp/common.gypi
gyp_skia
include/ports/SkHarfBuzzFont.h
include/views/SkOSWindow_wxwidgets.h
make.bat
make.py
src/opts/memset.arm.S
src/opts/memset16_neon.S
src/opts/memset32_neon.S
src/opts/opts_check_arm.cpp
src/ports/SkDebug_brew.cpp
src/ports/SkMemory_brew.cpp
src/ports/SkOSFile_brew.cpp
src/ports/SkXMLParser_empty.cpp
src/utils/ios/SkImageDecoder_iOS.mm
src/utils/ios/SkOSFile_iOS.mm
src/utils/ios/SkStream_NSData.mm
tests/FillPathTest.cpp
Review URL: http://codereview.appspot.com/4816058

git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-28 14:26:00 +00:00
bsalomon@google.com
50398bf7f1 Make GrTextureCache into a generic GrResource cache. Also some GrContext texture interface cleanup.
http://codereview.appspot.com/4815055/


git-svn-id: http://skia.googlecode.com/svn/trunk@1965 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-26 20:45:30 +00:00
bsalomon@google.com
cee661af92 Reapply r1951.
git-svn-id: http://skia.googlecode.com/svn/trunk@1959 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-26 12:32:36 +00:00
vandebo@chromium.org
ec36471096 Revert "Add sizeInBytes to GrResource, make GrRenderTarget aware of its pixel config (r1951)"
Temporarily revert this change in order to roll other changes into Chrome.

TBR=bsalomon@google.com

Review URL: http://codereview.appspot.com/4807051

git-svn-id: http://skia.googlecode.com/svn/trunk@1958 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-26 03:44:05 +00:00
bsalomon@google.com
aab1fd921c Add sizeInBytes to GrResource, make GrRenderTarget aware of its pixel config
Review URL: http://codereview.appspot.com/4802058/



git-svn-id: http://skia.googlecode.com/svn/trunk@1951 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-25 17:41:12 +00:00
senorblanco@chromium.org
2ce9a04b27 Improve GPU blur performance by clearing only when necessary. This gives a
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
2011-07-22 15:31:14 +00:00
senorblanco@chromium.org
fdaf2b9f8b Revert r1937 while I try to figure out the GM failures.
(Unreviewed; build fix).



git-svn-id: http://skia.googlecode.com/svn/trunk@1938 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-21 22:16:05 +00:00
senorblanco@chromium.org
b7f28d6ecd Improve GPU blur speed by clearing only when necessary. This gives a
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
2011-07-21 22:07:53 +00:00
tomhudson@google.com
237a461ec9 Instead of turning clipping off during AA, clip to the offscreen tile when
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
2011-07-19 15:44:00 +00:00
bsalomon@google.com
5c63865b52 Use texture cache for writePixels temp
Review URL: http://codereview.appspot.com/4757050/



git-svn-id: http://skia.googlecode.com/svn/trunk@1887 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-18 19:31:59 +00:00
bsalomon@google.com
d9f826c0db flip Y in uploads to bottom-up textures (and add gm test)
Review URL: http://codereview.appspot.com/4756043/



git-svn-id: http://skia.googlecode.com/svn/trunk@1882 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-18 15:25:04 +00:00
reed@google.com
970cb5597a convolve GrRefCnt and SkRefCnt
git-svn-id: http://skia.googlecode.com/svn/trunk@1873 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-15 15:52:28 +00:00
bsalomon@google.com
6b73e558ba Undo accidental commit of GrContext.cpp in r1860.
git-svn-id: http://skia.googlecode.com/svn/trunk@1861 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-14 15:50:53 +00:00
bsalomon@google.com
eb2aa1d0a2 Make CPU->GPU blur path use texture cache
Review URL: http://codereview.appspot.com/4730041/



git-svn-id: http://skia.googlecode.com/svn/trunk@1860 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-14 15:45:19 +00:00
bsalomon@google.com
84223118f7 Remove some cruft from SampleApp.cpp
Review URL: http://codereview.appspot.com/4724042



git-svn-id: http://skia.googlecode.com/svn/trunk@1858 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-14 14:45:44 +00:00
yangsu@google.com
bd3e3202ad Updated SkUIView to use the current code, added a default gl interface for ios
http://codereview.appspot.com/4717043/


git-svn-id: http://skia.googlecode.com/svn/trunk@1855 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-13 22:05:00 +00:00
bsalomon@google.com
0b96a84ca1 Remove unused SkGpuDevice functions, add GrRenderTarget handle getters
Code Review: http://codereview.appspot.com/4718041/



git-svn-id: http://skia.googlecode.com/svn/trunk@1854 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-13 21:53:49 +00:00
senorblanco@chromium.org
aadd9f8b19 GPU-based blur cleanup. Clean up some issues raised in code review:
- 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
2011-07-12 19:44:51 +00:00
senorblanco@chromium.org
027de5f922 GPU-based Gaussian blur.
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
2011-07-08 18:03:33 +00:00
bsalomon@google.com
22c5deaf75 Fix div by zero in GPU degenerate radials (and add sample and gm baselines)
Review URL: http://codereview.appspot.com/4675062/


git-svn-id: http://skia.googlecode.com/svn/trunk@1817 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-07 14:38:03 +00:00
bsalomon@google.com
1e257a5db3 Remove nested scope resolutions in GrGpuGLShaders and use enum counts for generating random values in unit test.
git-svn-id: http://skia.googlecode.com/svn/trunk@1807 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-06 19:52:16 +00:00
bsalomon@google.com
2c17fcdc45 Reduce gets of ext string and check validity of stencil format enums
Review URL: http://codereview.appspot.com/4678043/



git-svn-id: http://skia.googlecode.com/svn/trunk@1801 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-06 17:47:02 +00:00