aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
Commit message (Collapse)AuthorAge
* Temporary revert of r2510. The test that it introduced fails on the Mac ↵Gravatar bsalomon@google.com2011-10-20
| | | | | | build bots. I suspect there is something wrong with the Mac bot machine's GL that is preventing context creation from succeeding. The OpenGL Driver monitor on the machine only shows a software rasterizer. aglChoosePixelFormat seems to fail regardless of input. It may just need a reboot. I'll investigate it more on Monday. git-svn-id: http://skia.googlecode.com/svn/trunk@2511 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add test that validates GrGLInterfacesGravatar bsalomon@google.com2011-10-20
| | | | | | | | Review URL: http://codereview.appspot.com/5304048/ git-svn-id: http://skia.googlecode.com/svn/trunk@2510 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move a bunch of headers from include/gpu to src/gpu. Delete some unused files.Gravatar bsalomon@google.com2011-10-20
| | | | | | | | Review URL: http://codereview.appspot.com/5304047/ git-svn-id: http://skia.googlecode.com/svn/trunk@2506 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix macro call for getting fn ptr to EXT version of glGetQueryObjectui64v on ↵Gravatar bsalomon@google.com2011-10-20
| | | | | | windows. git-svn-id: http://skia.googlecode.com/svn/trunk@2505 2bbb7eff-a529-9590-31e7-b0007b416f81
* GrGLInterface fixes wrt r2499Gravatar bsalomon@google.com2011-10-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2502 2bbb7eff-a529-9590-31e7-b0007b416f81
* Virtualize SkGLContext with subclasses SkNativeGLContext and ↵Gravatar bsalomon@google.com2011-10-19
| | | | | | | | | | SkMesaGLContext, allow both in gm Review URL: http://codereview.appspot.com/5307045/ git-svn-id: http://skia.googlecode.com/svn/trunk@2499 2bbb7eff-a529-9590-31e7-b0007b416f81
* Extract six functions from GrGLProgram::genStageCode() to shorten it byGravatar tomhudson@google.com2011-10-19
| | | | | | | | ~170 LOC. git-svn-id: http://skia.googlecode.com/svn/trunk@2498 2bbb7eff-a529-9590-31e7-b0007b416f81
* Ensure all vertex attributes (except zero that we always use) are disabled ↵Gravatar bsalomon@google.com2011-10-19
| | | | | | | | | after a resetContext. Review URL: http://codereview.appspot.com/5309043/ git-svn-id: http://skia.googlecode.com/svn/trunk@2494 2bbb7eff-a529-9590-31e7-b0007b416f81
* Set stage params in program descriptor to canonical values when stage isn't usedGravatar bsalomon@google.com2011-10-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2486 2bbb7eff-a529-9590-31e7-b0007b416f81
* move utils/SkEGLContext to gpu/SkGLContext, some gpu.gyp cleanup, set eol ↵Gravatar bsalomon@google.com2011-10-13
| | | | | | | | | | style LF on all gpu files Review URL: http://codereview.appspot.com/5242056/ git-svn-id: http://skia.googlecode.com/svn/trunk@2474 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move gpu/include/* to include/gpu and gpu/src/* to src/gpuGravatar bsalomon@google.com2011-10-12
| | | | | | | | Review URL: http://codereview.appspot.com/5250070/ git-svn-id: http://skia.googlecode.com/svn/trunk@2471 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkAutoMaskImage so that we're less likely to write leaky code.Gravatar bungeman@google.com2011-10-04
| | | | | | | http://codereview.appspot.com/5180047/ git-svn-id: http://skia.googlecode.com/svn/trunk@2409 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix some VS2010 warningsGravatar bsalomon@google.com2011-09-29
| | | | | | | | | Review URL: http://codereview.appspot.com/5155043 git-svn-id: http://skia.googlecode.com/svn/trunk@2380 2bbb7eff-a529-9590-31e7-b0007b416f81
* use common code for treating thin lines as hairlines (much faster)Gravatar reed@google.com2011-09-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2296 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r2250 - removal of setMatrixClip() - because Chrome makes heavy useGravatar tomhudson@google.com2011-09-13
| | | | | | | | of those functions in a way we're not yet ready to clean up. git-svn-id: http://skia.googlecode.com/svn/trunk@2254 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replaces SkDevice::setMatrixClip() with markMatrixDirty() and markClipDirty(),Gravatar tomhudson@google.com2011-09-12
| | | | | | | | | | | which require no arguments and so may be called without requiring the matrix and clip to be completely evaluated. De-inlines virtual functions in SkDevice interface. git-svn-id: http://skia.googlecode.com/svn/trunk@2250 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename existing nonpreserving reallocs to reset, add reset to SkAutoMalloc, ↵Gravatar bsalomon@google.com2011-09-02
| | | | | | | | | use reset in GrBufferAllocPool Review URL: http://codereview.appspot.com/4951058/ git-svn-id: http://skia.googlecode.com/svn/trunk@2215 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkMatrix::getPerspectiveTypeMaskOnly() and SkMatrix::isTriviallyIdentity().Gravatar tomhudson@google.com2011-08-30
| | | | | | | | | Reduces profile time in setConcat() and computeTypeMask() for demos that do a lot of matrix concatenation. git-svn-id: http://skia.googlecode.com/svn/trunk@2191 2bbb7eff-a529-9590-31e7-b0007b416f81
* More prep work in Gr for landing AA hairline renderer.Gravatar bsalomon@google.com2011-08-23
| | | | | | | | Review URL: http://codereview.appspot.com/4944045 git-svn-id: http://skia.googlecode.com/svn/trunk@2164 2bbb7eff-a529-9590-31e7-b0007b416f81
* Get rid of createRenderTargetFrom3DAPIState and associated glGets necessary ↵Gravatar bsalomon@google.com2011-08-19
| | | | | | | | | | to support it. Review URL: http://codereview.appspot.com/4928041/ git-svn-id: http://skia.googlecode.com/svn/trunk@2144 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove GrContext::drawCustomVerticesGravatar bsalomon@google.com2011-08-16
| | | | | | | | Review URL: http://codereview.appspot.com/4910042/ git-svn-id: http://skia.googlecode.com/svn/trunk@2124 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unneeded sk/gr conversion codeGravatar bsalomon@google.com2011-08-16
| | | | | | | | Review URL: http://codereview.appspot.com/4876055/ git-svn-id: http://skia.googlecode.com/svn/trunk@2123 2bbb7eff-a529-9590-31e7-b0007b416f81
* Small miter limit check on Gr::drawRect.Gravatar bungeman@google.com2011-08-09
| | | | | | | | http://codereview.appspot.com/4838057/ git-svn-id: http://skia.googlecode.com/svn/trunk@2086 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix some ref leaksGravatar bsalomon@google.com2011-08-09
| | | | | | | | Review URL: http://codereview.appspot.com/4837068/ git-svn-id: http://skia.googlecode.com/svn/trunk@2082 2bbb7eff-a529-9590-31e7-b0007b416f81
* Clip GPU blur against clip bounds. Clip the size of the FBOs used for blursGravatar senorblanco@chromium.org2011-08-01
| | | | | | | | | | | | | | | | to the bounds of the clipping region, inflated by the blur radius. This is a little tricky, since we want the rect we use for downsampling to be an integer multiple of the scale factor, so we scale down the clip rect to downsampled space, inflate by the (scaled) kernel width, and intersect the rects there. Also check the blur radius against 0 and abort early, to prevent the fuzzer blowing up on a missing uniform. Review URL: http://codereview.appspot.com/4841043/ git-svn-id: http://skia.googlecode.com/svn/trunk@2020 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing the ignore transform flag in Ganesh with mask filter and drawBitmapGravatar junov@google.com2011-07-28
| | | | | | | | | | TEST=SampleApp/Texture Domain BUG=http://code.google.com/p/skia/issues/detail?id=335 REVIEW=http://codereview.appspot.com/4803052/ git-svn-id: http://skia.googlecode.com/svn/trunk@1987 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make GrTextureCache into a generic GrResource cache. Also some GrContext ↵Gravatar bsalomon@google.com2011-07-26
| | | | | | | | | texture interface cleanup. http://codereview.appspot.com/4815055/ git-svn-id: http://skia.googlecode.com/svn/trunk@1965 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improve GPU blur performance by clearing only when necessary. This gives aGravatar senorblanco@chromium.org2011-07-22
| | | | | | | | | | | | | | | | | | 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
* Revert r1937 while I try to figure out the GM failures.Gravatar senorblanco@chromium.org2011-07-21
| | | | | | | | (Unreviewed; build fix). git-svn-id: http://skia.googlecode.com/svn/trunk@1938 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improve GPU blur speed by clearing only when necessary. This gives aGravatar senorblanco@chromium.org2011-07-21
| | | | | | | | | | | | | | | | | | 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
* Fix GPU blur cacheing bug. Sometimes, the texture cache serves us textures ofGravatar senorblanco@chromium.org2011-07-19
| | | | | | | | | | | | | | | different sizes for srcTexture and dstTexture (this is fair; they're supposed to be approximate). Code was assuming otherwise while downsampling; fix is to reapply the scale on each downsample. (Yes, I could cache these reciprocals if and when they prove to be a hot spot). Also, use setIDiv(w,h) everywhere for conciseness. Review URL: http://codereview.appspot.com/4798041/ git-svn-id: http://skia.googlecode.com/svn/trunk@1907 2bbb7eff-a529-9590-31e7-b0007b416f81
* Enable the GPU-based blur by default in Skia, and provide a #define to disableGravatar senorblanco@chromium.org2011-07-19
| | | | | | | | | | | | | it (SK_DISABLE_GPU_BLUR). Note: this change will break some the GM test results. I've attempted to rebaseline MacPro float results; more to come. Review URL: http://codereview.appspot.com/4784043/ git-svn-id: http://skia.googlecode.com/svn/trunk@1901 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix kernel width calculation in GPU-based Gaussian blur. When converting theGravatar senorblanco@chromium.org2011-07-18
| | | | | | | | | sigma value to a kernel width, it should be rounded up. Otherwise, for small sigmas, the edge pixels of the kernel may be missing. git-svn-id: http://skia.googlecode.com/svn/trunk@1891 2bbb7eff-a529-9590-31e7-b0007b416f81
* GPU strokeAndFill only does the fillGravatar bungeman@google.com2011-07-18
| | | | | | | | http://codereview.appspot.com/4743047/ git-svn-id: http://skia.googlecode.com/svn/trunk@1884 2bbb7eff-a529-9590-31e7-b0007b416f81
* More GPU blur fixes.Gravatar senorblanco@chromium.org2011-07-15
| | | | | | | | | | | | | | - clamp the max. radius to 128, as the software path does - use a more accurate radius-to-sigma conversion (0.6 instead of 0.6666) - make SampleBlur derive from SampleView, not SkView, so benchmark mode ('f') works - implement a new BigBlur sample to test large radii Review URL: http://codereview.appspot.com/4726043 git-svn-id: http://skia.googlecode.com/svn/trunk@1871 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make CPU->GPU blur path use texture cacheGravatar bsalomon@google.com2011-07-14
| | | | | | | | Review URL: http://codereview.appspot.com/4730041/ git-svn-id: http://skia.googlecode.com/svn/trunk@1860 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix clipping problem in GPU-based blur. The FBOs used for the fast GaussianGravatar senorblanco@chromium.org2011-07-14
| | | | | | | | | | | | blur were being clipped to the size of the output window, causing the blurred primitive to be truncated if the FBO was larger than the output window. Clip them to the srcRect instead, and restore when done. Review URL: http://codereview.appspot.com/4695057/ git-svn-id: http://skia.googlecode.com/svn/trunk@1859 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unused SkGpuDevice functions, add GrRenderTarget handle gettersGravatar bsalomon@google.com2011-07-13
| | | | | | | | Code Review: http://codereview.appspot.com/4718041/ git-svn-id: http://skia.googlecode.com/svn/trunk@1854 2bbb7eff-a529-9590-31e7-b0007b416f81
* GPU-based blur cleanup. Clean up some issues raised in code review:Gravatar senorblanco@chromium.org2011-07-12
| | | | | | | | | | | | | | | | | - 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
* Fix windows build (unreviewed).Gravatar senorblanco@chromium.org2011-07-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1840 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement blur types for GPU-based Gaussian blur.Gravatar senorblanco@chromium.org2011-07-12
| | | | | | | | | | | | Implements the remaining blur types (inner, outer, solid) in the GPU-based Gaussian blur. They are implemented using a post-upsampling blending pass. Also includes some code cleanup and comments. Review URL: http://codereview.appspot.com/4664075/ git-svn-id: http://skia.googlecode.com/svn/trunk@1839 2bbb7eff-a529-9590-31e7-b0007b416f81
* GPU-based Gaussian blur.Gravatar senorblanco@chromium.org2011-07-08
| | | | | | | | | | | | | | | | 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
* Modulate color shader's alpha with paint alpha when setting up gpu paint ↵Gravatar bsalomon@google.com2011-07-08
| | | | | | | | | | (fixes SampleTinyBitmap) Review URL: http://codereview.appspot.com/4648076/ git-svn-id: http://skia.googlecode.com/svn/trunk@1828 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow texture-backed bitmaps to perform a read-back when lockPixels is called.Gravatar reed@google.com2011-07-07
| | | | | | | | | | This means we have to be even more cautious about when we call lock, and we should always check getTexture() first if we can handle a texture directly, rather than forcing the read-back to get the bits. git-svn-id: http://skia.googlecode.com/svn/trunk@1815 2bbb7eff-a529-9590-31e7-b0007b416f81
* ColorShaders report no bitmaps, but only a color_gradient, which we now detectGravatar reed@google.com2011-07-06
| | | | | | | | on the gpu side. git-svn-id: http://skia.googlecode.com/svn/trunk@1810 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkDeviceFactory from the collective consciousness, now that devices knowGravatar reed@google.com2011-07-06
| | | | | | | | how to create compatible siblings. git-svn-id: http://skia.googlecode.com/svn/trunk@1808 2bbb7eff-a529-9590-31e7-b0007b416f81
* suppress printfsGravatar reed@google.com2011-07-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1793 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't call setContext on shader (not necessary), since now gradients ensure thatGravatar reed@google.com2011-07-05
| | | | | | | | | | their bitmap will be built with opaque colors. Also, this avoids calling lockPixels on the shader's bitmap (if it has one), which is usually not needed or desired, given that we're a gpu device. git-svn-id: http://skia.googlecode.com/svn/trunk@1790 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r1775 at Mike and Brian's requestGravatar epoger@google.com2011-07-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1786 2bbb7eff-a529-9590-31e7-b0007b416f81