skia2/include/gpu
reed@google.com 33535f3c48 Reimplement drawBitmapRectToRect to correctly handle fraction srcRect.
The prev impl relied on drawBitmap "deducing" the destination rect by applying
the computed matrix to the bitmap's bounds. This cannot be done if the srcRect
is fractional, and therefore not representable w/ a bitmap.

The new impl computes the same matrix, but calls down to the device via drawRect
+ a bitmap_shader. This allows us to specfiy the dstRect explicitly.

The possible down-side is that we now rely on the device subclass to efficiently
handle draRect+shader, instead of calling its drawBitmap entry-point.

To give the device the chance to handle this differently, I now call through to
a new device virtual: drawBitmapRect. The default impl is to create the shader
and call drawRect, but a subclass can intercept that.

For now, the GPU override of drawBitmapRect is mimicing the old behavior (by
rounding the srcRect to an iRect). This preserves its ability to call drawBitmap
which handles very-large textures, but shows some gittering/imprecision, due to
the rounding. ... this is the same GPU behavior we have before this CL.
Review URL: https://codereview.appspot.com/6542065

git-svn-id: http://skia.googlecode.com/svn/trunk@5663 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-25 15:37:50 +00:00
..
gl Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
GrAARectRenderer.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
GrCacheID.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
GrClipData.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
GrColor.h Add GrColor to RGBA float helper func 2012-09-17 17:23:21 +00:00
GrConfig.h Allow cache tracking to be enabled in release 2012-08-31 13:07:37 +00:00
GrContext.h Fix for GrTextureStripAtlas memory leak 2012-09-24 19:33:59 +00:00
GrContextFactory.h Revert r5491, r5495, r5497, and r5498. 2012-09-11 20:39:09 +00:00
GrCustomStage.h Wrap all GrCustomStage textures in GrTextureAccess, remove StageDesc::fInConfigFlags 2012-09-11 15:45:20 +00:00
GrCustomStageUnitTest.h add LF at the end, since this is SO important the chrome-mac build failed. 2012-08-06 14:37:22 +00:00
GrFontScaler.h plumb SkInstCnt to all subclasses of GrRefCnt 2012-06-26 20:16:17 +00:00
GrGlyph.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
GrInstanceCounter.h Move gpu/include/* to include/gpu and gpu/src/* to src/gpu 2011-10-12 19:53:16 +00:00
GrKey.h plumb SkInstCnt to all subclasses of GrRefCnt 2012-06-26 20:16:17 +00:00
GrMatrix.h Move gpu/include/* to include/gpu and gpu/src/* to src/gpu 2011-10-12 19:53:16 +00:00
GrNoncopyable.h Move gpu/include/* to include/gpu and gpu/src/* to src/gpu 2011-10-12 19:53:16 +00:00
GrPaint.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
GrPoint.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
GrProgramStageFactory.h Introduction of set of functions to manage generation of texture fetch shader code. 2012-08-02 15:15:16 +00:00
GrRect.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
GrRefCnt.h Move gpu/include/* to include/gpu and gpu/src/* to src/gpu 2011-10-12 19:53:16 +00:00
GrRenderTarget.h Simplified stencil buffer caching 2012-09-05 15:46:34 +00:00
GrResource.h Enforce calling of inherited onRelease & onAbandon mthds in GrResource-derived classes 2012-09-05 18:37:39 +00:00
GrSamplerState.h Move GrTextureParams from GrSamplerState to GrTextureAccess 2012-09-18 14:14:49 +00:00
GrScalar.h Fixed Windows compiler complaints 2012-07-10 17:30:58 +00:00
GrSurface.h Remove _UPM_ GrPixelConfigs 2012-08-20 19:22:38 +00:00
GrTextContext.h Un-trifurcate GrTextContext: get rid of Default and Batched subclasses, 2012-06-29 18:37:57 +00:00
GrTexture.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
GrTextureAccess.h Fix GrTextureAccess::operator == 2012-09-20 15:37:30 +00:00
GrTypes.h Fix int64->int32 warning 2012-08-28 21:45:26 +00:00
GrUserConfig.h Make all GrContext draws go through the draw buffer. 2012-08-16 18:36:06 +00:00
SkGpuCanvas.h Remove comment related to removed function. 2011-09-01 15:55:31 +00:00
SkGpuDevice.h Reimplement drawBitmapRectToRect to correctly handle fraction srcRect. 2012-09-25 15:37:50 +00:00
SkGr.h Replaced TextureCacheEntry with GrTexture* and a back pointer to GrResourceEntry (in GrTexture) 2012-08-16 14:49:16 +00:00
SkGrPixelRef.h Make the SkGrPixelRef be responsible for unlocking device's scratch texture in the cache 2012-08-28 15:07:11 +00:00
SkGrTexturePixelRef.h Partially rolled forward the SkGrPixelRef changes 2012-06-29 20:55:14 +00:00