|
Change drawBitmapRect to take a float-src-rect instead of integer-src-rect. This
allows the client more control over the scaling. Because of virtual overrides
and wanting to keep the old call-sites up and running, this CL renames the
virtual entry-point to drawBitmapRectToRect, and downgrades drawBitmapRect to
a non-virtual helper function.
The implementation is to use the float-rect for computing the matrix, but still
cons-up an integer rect for the purposes of subsetting the original bitmap. We
do this by calling float_src->roundOut(&int_src) so that we include all
(partially) covered src pixels.
No change needed on SkDevice, since that signature is explicitly passed the
computed matrix.
Committed: https://code.google.com/p/skia/source/detail?r=5578
Total comments: 3
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+202 lines, -81 lines) |
Patch |
|
M |
debugger/SkDebugCanvas.h
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
debugger/SkDebugCanvas.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
debugger/SkDrawCommand.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
debugger/SkDrawCommand.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
A |
gm/bitmaprect.cpp
|
View
|
1
2
|
1 chunk |
+100 lines, -0 lines |
0 comments
|
Download
|
|
M |
gyp/gmslides.gypi
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
include/core/SkCanvas.h
|
View
|
1
|
2 chunks |
+20 lines, -3 lines |
0 comments
|
Download
|
|
M |
include/utils/SkDeferredCanvas.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
include/utils/SkDumpCanvas.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
include/utils/SkNWayCanvas.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
include/utils/SkProxyCanvas.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/core/SkBBoxRecord.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/core/SkBBoxRecord.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/core/SkCanvas.cpp
|
View
|
|
4 chunks |
+36 lines, -31 lines |
0 comments
|
Download
|
|
M |
src/core/SkPicture.cpp
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/core/SkPictureFlat.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/core/SkPicturePlayback.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/core/SkPictureRecord.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/core/SkPictureRecord.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/pipe/SkGPipePriv.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/pipe/SkGPipeWrite.cpp
|
View
|
|
3 chunks |
+4 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/utils/SkDeferredCanvas.cpp
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/utils/SkDumpCanvas.cpp
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/utils/SkNWayCanvas.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/utils/SkProxyCanvas.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 9
|