Commit Graph

1352 Commits

Author SHA1 Message Date
reed@google.com
f1ab723033 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.
Review URL: https://codereview.appspot.com/6501140

git-svn-id: http://skia.googlecode.com/svn/trunk@5578 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-18 12:59:44 +00:00
borenet@google.com
66bcbd12bf Check for invalid SkPictures
- Remove hasRecorded() since nobody uses it.
- Add "success" boolean to SkPicture stream constructor
- Track failures in render_pictures and bench_pictures
Review URL: https://codereview.appspot.com/6493105

git-svn-id: http://skia.googlecode.com/svn/trunk@5573 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-17 18:26:06 +00:00
bsalomon@google.com
7534747e63 Add GrColor to RGBA float helper func
Review URL: https://codereview.appspot.com/6518044/





git-svn-id: http://skia.googlecode.com/svn/trunk@5572 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-17 17:23:21 +00:00
bsalomon@google.com
6c5418e6c2 Temporarily revert r5433 due to http://www.crbug.com/148637 until after M23 branch.
git-svn-id: http://skia.googlecode.com/svn/trunk@5557 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-14 20:30:37 +00:00
rileya@google.com
1c6307e36f Fix some nits from http://codereview.appspot.com/6506103/
git-svn-id: http://skia.googlecode.com/svn/trunk@5547 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-14 15:52:47 +00:00
skia.committer@gmail.com
1d225f2b33 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5539 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-14 02:01:10 +00:00
rileya@google.com
8515e79a76 Add R-Tree record flag to SkPicture, plus some cleanup/fixes in associated classes.
Review URL: https://codereview.appspot.com/6506103

git-svn-id: http://skia.googlecode.com/svn/trunk@5537 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-13 21:41:51 +00:00
reed@google.com
1f1543f012 re-apply 5508, but with the new compile-flag disabled for now
git-svn-id: http://skia.googlecode.com/svn/trunk@5516 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-12 21:08:33 +00:00
scroggo@google.com
d8a6cc814f Make texteffects gm work through serialization and pipe.
Move Line2DPathEffect (now Sk_) into a separate header file so it can
be shared and initialized.

Switch to the shared version in SampleAll and SampleSlides.

Remove the skip pipe flag from texteffects, since it can now be serialized.

I have a separate change to turn serialization on by default at https://codereview.appspot.com/6498121/

Review URL: https://codereview.appspot.com/6503106

git-svn-id: http://skia.googlecode.com/svn/trunk@5512 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-12 18:53:49 +00:00
reed@google.com
bfe1572f24 revert 5508 -- it broke most of the builds
Use http://skia.googlecode.com/svn/buildbot/buildbots.html to see the state of the build.



git-svn-id: http://skia.googlecode.com/svn/trunk@5511 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-12 18:34:49 +00:00
wjmaclean@chromium.org
1f8787a99f Using the device scale factor for glyph positioning
The master bug is http://code.google.com/p/chromium/issues/detail?id=138101 .
The corresponding WebKit changes for this CL are here:
https://bugs.webkit.org/show_bug.cgi?id=96137

BUG=

Review URL: https://codereview.appspot.com/6506099

git-svn-id: http://skia.googlecode.com/svn/trunk@5508 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-12 15:53:20 +00:00
borenet@google.com
dabdd9e71d Revert r5491, r5495, r5497, and r5498.
Review URL: https://codereview.appspot.com/6499097

git-svn-id: http://skia.googlecode.com/svn/trunk@5501 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 20:39:09 +00:00
borenet@google.com
bcfa637e7d printf->SkDebugf for r5491
Over-the-shoulder review by robertphillips@

git-svn-id: http://skia.googlecode.com/svn/trunk@5495 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 19:00:37 +00:00
borenet@google.com
fb3dd3a6f5 Temporarily add logging to GrContextFactory and SkNativeGLContext_android
Over-the-shoulder review from robertphillips@ and bsalomon@

Will revert soon.
Review URL: https://codereview.appspot.com/6496110

git-svn-id: http://skia.googlecode.com/svn/trunk@5491 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 18:35:35 +00:00
bsalomon@google.com
6d003d1ddc Wrap all GrCustomStage textures in GrTextureAccess, remove StageDesc::fInConfigFlags
Review URL: https://codereview.appspot.com/6494114



git-svn-id: http://skia.googlecode.com/svn/trunk@5485 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 15:45:20 +00:00
bsalomon@google.com
047696c1c6 Move GrTextureAccess decl/defn to separate files
Review URL: https://codereview.appspot.com/6500104/



git-svn-id: http://skia.googlecode.com/svn/trunk@5482 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 13:29:29 +00:00
skia.committer@gmail.com
d6ce0db164 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5456 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-10 02:01:22 +00:00
robertphillips@google.com
9fbcad0f00 Removed old resource locking system
https://codereview.appspot.com/6488098/



git-svn-id: http://skia.googlecode.com/svn/trunk@5453 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-09 14:44:15 +00:00
robertphillips@google.com
50a035ddbb Added explicit cache clearing
http://codereview.appspot.com/6492094/



git-svn-id: http://skia.googlecode.com/svn/trunk@5444 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-07 19:44:33 +00:00
bsalomon@google.com
69aca79b5c SkPathRef: one allocation for pts+verbs, path GenID, copy-on-write
Review URL: https://codereview.appspot.com/6488063/



git-svn-id: http://skia.googlecode.com/svn/trunk@5433 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-07 15:35:06 +00:00
bsalomon@google.com
5e72845024 Add SK_API to path == decl.
Over-the-shoulder review from robertphillips@



git-svn-id: http://skia.googlecode.com/svn/trunk@5426 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-07 13:32:37 +00:00
skia.committer@gmail.com
6c778164a7 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5410 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-06 02:01:13 +00:00
robertphillips@google.com
d364554bcf Enforce calling of inherited onRelease & onAbandon mthds in GrResource-derived classes
http://codereview.appspot.com/6499077/



git-svn-id: http://skia.googlecode.com/svn/trunk@5405 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-05 18:37:39 +00:00
robertphillips@google.com
d6bbbf8a83 Simplified stencil buffer caching
https://codereview.appspot.com/6503073/



git-svn-id: http://skia.googlecode.com/svn/trunk@5400 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-05 15:46:34 +00:00
bungeman@google.com
b24b4fa12b Future proof luminance caches.
https://codereview.appspot.com/6495071/


git-svn-id: http://skia.googlecode.com/svn/trunk@5382 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-04 13:49:59 +00:00
robertphillips@google.com
9474ed0617 Switch GrGpu's GrResource list over to using SkTDLinkedList
https://codereview.appspot.com/6500062/



git-svn-id: http://skia.googlecode.com/svn/trunk@5379 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-04 13:34:32 +00:00
scroggo@google.com
58b4ead36c Perform multi core rendering in bench_pictures.
Add a flag in SkGPipeWriter for threadsafe drawing.

Add a deferred pipe controller to SamplePipeControllers, which can
be called to play back in multiple threads.

Depends on http://codereview.appspot.com/6459105/

Review URL: https://codereview.appspot.com/6482068

git-svn-id: http://skia.googlecode.com/svn/trunk@5371 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-31 16:15:22 +00:00
robertphillips@google.com
5955202c80 Allow cache tracking to be enabled in release
https://codereview.appspot.com/6500057/



git-svn-id: http://skia.googlecode.com/svn/trunk@5365 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-31 13:07:37 +00:00
scroggo@google.com
057655589f Remove dead code and update a comment.
InlineFactoryNames_Flag is no longer used, so remove it and update
the comment.

Review URL: https://codereview.appspot.com/6492057

git-svn-id: http://skia.googlecode.com/svn/trunk@5348 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-30 17:34:29 +00:00
skia.committer@gmail.com
a27096b474 Sanitizing source files in Skia_Nightly_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5346 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-30 14:38:00 +00:00
reed@google.com
1cf58d03a8 add SkWriter32::rewindToOffset() -- used for peephole edits in picture recording
git-svn-id: http://skia.googlecode.com/svn/trunk@5345 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-30 14:03:21 +00:00
robertphillips@google.com
a9b0623eac Added find, lock to GrContext & GrResourceCache interfaces
https://codereview.appspot.com/6499052/



git-svn-id: http://skia.googlecode.com/svn/trunk@5343 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-30 11:06:31 +00:00
bsalomon@google.com
405d0f43d8 In which a series of things around attachToCanvas and writePixels are fixed
Review URL: https://codereview.appspot.com/6506051/



git-svn-id: http://skia.googlecode.com/svn/trunk@5341 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-29 21:26:13 +00:00
djsollen@google.com
c9ab987efc Implement multi-threaded picture playback via cloning.
The CL adds SkPicture.clone() which produces a thread-safe copy by
creating a shallow copy of the thread-safe data within the picture and
a deep copy of the data that is not (e.g. SkPaint).  This implementation
re-flattens the paints when cloning instead of retaining the flattened
paints from the recording process.

Changes were also needed to various classes to ensure thread safety

Review URL: https://codereview.appspot.com/6459105

git-svn-id: http://skia.googlecode.com/svn/trunk@5335 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-29 18:52:07 +00:00
bsalomon@google.com
5e497329bb Fix int64->int32 warning
git-svn-id: http://skia.googlecode.com/svn/trunk@5330 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 21:45:26 +00:00
bungeman@google.com
1bfe01d06b When creating gray from lcd, use luminance instead of coverage.
https://codereview.appspot.com/6496048/


git-svn-id: http://skia.googlecode.com/svn/trunk@5318 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 16:02:42 +00:00
digit@google.com
536079b209 Fix Clang build on Android.
The optimize attribute is not supported with Clang/ARM r161757.

This warning, turned into an error, is emitted by -Wattribute (implicitly set).
Review URL: https://codereview.appspot.com/6489045

git-svn-id: http://skia.googlecode.com/svn/trunk@5316 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 15:22:37 +00:00
bsalomon@google.com
8090e651fc Make the SkGrPixelRef be responsible for unlocking device's scratch texture in the cache
Review URL: https://codereview.appspot.com/6498046/



git-svn-id: http://skia.googlecode.com/svn/trunk@5313 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 15:07:11 +00:00
reed@google.com
7edfb4939e need to declare INHERITED for the instcount macros
git-svn-id: http://skia.googlecode.com/svn/trunk@5309 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 12:48:35 +00:00
reed@google.com
fd875e8014 re-enable inst counting
git-svn-id: http://skia.googlecode.com/svn/trunk@5308 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 12:43:54 +00:00
bsalomon@google.com
a292112154 Remove SkGpuDevice::fTexture, use new pixel ref class name
Review URL: https://codereview.appspot.com/6474068/


git-svn-id: http://skia.googlecode.com/svn/trunk@5307 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 12:34:17 +00:00
reed@google.com
97af1a64ae Add caching of the snapshot image form a surface
Notify the surface when the canvas draws into it, so it can invalidate the
cached image, and (if needed) perform a copy-on-write on the surface if it
was being shared with the image.
Review URL: https://codereview.appspot.com/6441115

git-svn-id: http://skia.googlecode.com/svn/trunk@5306 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 12:19:02 +00:00
bsalomon@google.com
a04e8e8424 Do premul and r/b swap conversions in a custom effect
Review URL: https://codereview.appspot.com/6473060/



git-svn-id: http://skia.googlecode.com/svn/trunk@5284 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-27 12:53:13 +00:00
keyar@chromium.org
f4959ab118 Implemented power of two tiling.
Review URL: https://codereview.appspot.com/6485056

git-svn-id: http://skia.googlecode.com/svn/trunk@5274 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 20:53:25 +00:00
rmistry@google.com
fbfcd56021 Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054

git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 18:09:54 +00:00
senorblanco@chromium.org
1fb9525e50 warning fix (unreviewed).
git-svn-id: http://skia.googlecode.com/svn/trunk@5258 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 16:29:26 +00:00
bsalomon@google.com
39ac1aec0e #if SK_DEBUG -> #ifdef SK_DEBUG in SkTDLinkedList.h (to fix chrome android trybot errors)
git-svn-id: http://skia.googlecode.com/svn/trunk@5251 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 13:24:31 +00:00
robertphillips@google.com
2ea0a231a8 Refactored GrDLinkedList into SkTDLinkedList
http://codereview.appspot.com/6484045/



git-svn-id: http://skia.googlecode.com/svn/trunk@5247 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 11:13:48 +00:00
senorblanco@chromium.org
84207c4278 Move the code for the GPU implementation of morphology effects from GrContext
and GrMorphologyEffect.* into SkMorphologyImageFilter.cpp.

Review URL:  https://codereview.appspot.com/6458065/



git-svn-id: http://skia.googlecode.com/svn/trunk@5241 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-22 20:51:19 +00:00
bungeman@google.com
1fd201b9df SkRef for expressions.
https://codereview.appspot.com/6475045/


git-svn-id: http://skia.googlecode.com/svn/trunk@5238 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-22 18:56:56 +00:00