mike@reedtribe.org
f8b1ebc35b
add helpers for isTranslate and isScaleTranslate
...
special-case determinant for isScaleTranslate
git-svn-id: http://skia.googlecode.com/svn/trunk@6725 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 03:27:47 +00:00
bsalomon@google.com
c6b3e48cb3
Improve handling of inverse clip paths in GrClipMaskManager.
...
Will require rebaselining of complexclip_aa and complexclip_aa_layer on GPU.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6907052
git-svn-id: http://skia.googlecode.com/svn/trunk@6712 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-07 20:43:52 +00:00
scroggo@google.com
a2a3192847
Fix some extract subset bugs.
...
In SkBitmap::extractSubset, perform a deepCopy, if the pixelRef supports it.
Fixes a bug in the 'extractbitmap' gm, which attempts to draw a subset of a texture backed bitmap (if the canvas is really an SkGpuCanvas).
Also fix some bugs that happen when there is a pixel offset. These fixes get bypassed by the deepCopy, but a user can still set a pixel offset manually.
When copying GPU backed bitmap with a pixel offset, copy the offset.
If the new config is the same as the old, copy fRowBytes as well.
Add a function to SkBitmap.cpp (getUpperLeftFromOffset) to find the x,y coordinate to use when copying to a new config.
Fix a bug where readPixels copied to the correct desired config and we were setting the generation ID to match even though the desired config was not the same as the original config (caught by my new tests!).
Add some tests to verify the correct behavior.
Review URL: https://codereview.appspot.com/6839043
git-svn-id: http://skia.googlecode.com/svn/trunk@6710 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-07 19:14:45 +00:00
reed@google.com
f56225c848
speedup peek32() when the offset is in the last block (fTail)
...
Review URL: https://codereview.appspot.com/6906047
git-svn-id: http://skia.googlecode.com/svn/trunk@6708 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-07 17:48:04 +00:00
epoger@google.com
d27fe34d1e
comment-only fix
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6702 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-07 15:27:27 +00:00
junov@google.com
dbfac8a723
Defining new color constat for transparent color
...
Review URL: https://codereview.appspot.com/6901044
git-svn-id: http://skia.googlecode.com/svn/trunk@6696 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06 21:47:40 +00:00
sugoi@google.com
12b4e27ae1
As part of preliminary groundwork for a chromium fix, this changelist is deprecating GrPathFill so that SkPath::FillType is used everywhere in order to remove some code duplication between Skia and Ganesh.
...
BUG=chromium:135111
TEST=Try path rendering tests from the gm
Review URL: https://codereview.appspot.com/6875058
git-svn-id: http://skia.googlecode.com/svn/trunk@6693 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06 20:13:11 +00:00
reed@google.com
eb776128f5
add query to pixelref for its encoded data (if it has any)
...
Review URL: https://codereview.appspot.com/6891047
git-svn-id: http://skia.googlecode.com/svn/trunk@6689 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06 14:26:02 +00:00
skia.committer@gmail.com
0264fb4543
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6687 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06 02:01:25 +00:00
reed@google.com
99b5c7f94b
optimize translate and scale
...
add map2() to optimize for mapping an array of 2D points into homogeneous 4-vector
Review URL: https://codereview.appspot.com/6874064
git-svn-id: http://skia.googlecode.com/svn/trunk@6685 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-05 22:13:59 +00:00
robertphillips@google.com
935ad02682
Add drawPoints dash bench
...
https://codereview.appspot.com/6866053/
git-svn-id: http://skia.googlecode.com/svn/trunk@6678 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-05 19:07:21 +00:00
djsollen@google.com
fdabcb511d
Add missing SK_API definition at request of Chromium callers
...
Review URL: https://codereview.appspot.com/6878050
git-svn-id: http://skia.googlecode.com/svn/trunk@6671 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-05 06:15:42 +00:00
senorblanco@chromium.org
4a9a612b52
Pull SkMergeImageFilter out into its own file.
...
Review URL: https://codereview.appspot.com/6873052
git-svn-id: http://skia.googlecode.com/svn/trunk@6662 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 14:18:50 +00:00
bsalomon@google.com
8182fa0cac
Make SkClipStack::Iter use SkClipStack::Element.
...
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6871051
git-svn-id: http://skia.googlecode.com/svn/trunk@6661 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 14:06:06 +00:00
skia.committer@gmail.com
e659c2e820
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6660 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 02:01:25 +00:00
robertphillips@google.com
b8b8ba01f0
Fix compiler error in SkTInternalList.h
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6659 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 23:34:32 +00:00
borenet@google.com
bc293c4aa4
Added SK_BUILD_FOR_NACL to SkPreConfig.h
...
Submitted on behalf of bmilnor@
git-svn-id: http://skia.googlecode.com/svn/trunk@6656 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 21:38:58 +00:00
reed@google.com
7d68335eb4
add getTypes() to SkMatrix44, to cache how complex the matrix is.
...
add bench
optimize operator== by performing 4 compares in a row before checking
optimize setconcat by noting when we can write the answer directly into this
At least on this macbook, I had to mark helpers like isIdentity() as inline to get them inlined.
Review URL: https://codereview.appspot.com/6863053
git-svn-id: http://skia.googlecode.com/svn/trunk@6655 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 21:19:52 +00:00
bsalomon@google.com
dd3f7a9efe
Reland r6649 with fix for build errors.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6653 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 19:47:41 +00:00
bsalomon@google.com
acc71aa5c2
Revert 6649 due to build breaks.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6651 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 19:18:57 +00:00
bsalomon@google.com
4928f86eda
Insert in middle of SkTInternalLList and SkTLList, in place cons for
...
SkTLList.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6870050
git-svn-id: http://skia.googlecode.com/svn/trunk@6649 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 19:05:44 +00:00
robertphillips@google.com
93f0332418
Fixed remaining clang compiler warnings
...
https://codereview.appspot.com/6865053/
git-svn-id: http://skia.googlecode.com/svn/trunk@6646 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 17:35:19 +00:00
bsalomon@google.com
42619d8df2
Rename SkTDLinkedList to SkTInternalLinked list, add some methods useful for forthcoming SkTLList.
...
Review URL: https://codereview.appspot.com/6858101
git-svn-id: http://skia.googlecode.com/svn/trunk@6643 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 14:54:59 +00:00
tomhudson@google.com
0da23a5184
Tweak an enum declaration to make the clang compiler happy.
...
This exposes our "unknown type" to users, which is a loss of encapsulation.
TBR=robertphillips
http://codereview.appspot.com/6865050/
git-svn-id: http://skia.googlecode.com/svn/trunk@6641 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 11:41:21 +00:00
reed@google.com
9f0af0a285
Create aliases AddRef() and Release() to SkRefCnt for compatibility with scoped_refptr
...
Review URL: https://codereview.appspot.com/6844116
git-svn-id: http://skia.googlecode.com/svn/trunk@6639 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-30 21:30:42 +00:00
djsollen@google.com
000dea7573
Disabling validation of the glyph cache for standard debug builds.
...
The validation step is adding 50% overhead to the rendering of
text heavy SkPicture files.
Review URL: https://codereview.appspot.com/6856123
git-svn-id: http://skia.googlecode.com/svn/trunk@6635 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-30 16:19:32 +00:00
skia.committer@gmail.com
c3d7d90973
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6632 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-30 02:01:24 +00:00
jamesr@chromium.org
deb4c16969
Keep track of identity SkMatrix44s
...
This keeps a bool on SkMatrix44 indicating if we know for sure that the matrix
is identity, similar to the TypeMask on SkMatrix. This is useful to early-out
of potentially expensive matrix math at the cost of some memory.
Review URL: https://codereview.appspot.com/6854113
git-svn-id: http://skia.googlecode.com/svn/trunk@6620 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:17:16 +00:00
bsalomon@google.com
5fac58c91d
Remove SkClipStack::Iter::combinedNext.
...
Review URL: https://codereview.appspot.com/6844114
git-svn-id: http://skia.googlecode.com/svn/trunk@6619 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:14:59 +00:00
scroggo@google.com
9f686f3639
Create a factory to decode an SkBitmap from an SkData.
...
Add a test and a GM for the factory, and a PNG file for it to decode.
The PNG file is copyright-free, obtained from
http://openclipart.org/detail/29213/paper-plane-by-ddoo
In cmykjpeg, do not attempt to decode in the constructor, since it
currently crashes on Mac (if you provide the correct resource path).
Even when we fix this crash there is no need to do it in the
constructor, since we create all of the gms in order to
get their names (to determine whether to run them).
Review URL: https://codereview.appspot.com/6847122
git-svn-id: http://skia.googlecode.com/svn/trunk@6618 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:05:37 +00:00
bsalomon@google.com
8a98e3bd18
Make SkClipStack::Element public.
...
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6858096
git-svn-id: http://skia.googlecode.com/svn/trunk@6617 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:05:13 +00:00
reed@google.com
fe7b1ed30a
add SkPictureUtils::GatherPixelRefs()
...
Review URL: https://codereview.appspot.com/6845106
git-svn-id: http://skia.googlecode.com/svn/trunk@6615 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:00:39 +00:00
bsalomon@google.com
9128edc700
Rename SkClipStack::Rec to SkClipStack::Element
...
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6854115
git-svn-id: http://skia.googlecode.com/svn/trunk@6605 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 18:58:19 +00:00
senorblanco@chromium.org
91f489a65d
Modify the blur bench to add tests for high-quality blurs, and large non-integer blurs. Change the Coarse flag (which just turns on separable blurs) to an #ifdef, since separable is no longer just Coarse. (This #ifdef will hopefully be shortlived, once Chrome has switched).
...
The separable blur algorithm gives +45% on SampleBlur, +84% on SampleBigBlur, +31% on TheVerge, +35 to +85% on blurbench in HQ (depending on size), +8 to +35% in low quality. (All of these on 32bit MacPro).
Review URL: https://codereview.appspot.com/6851117
git-svn-id: http://skia.googlecode.com/svn/trunk@6601 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 17:09:27 +00:00
robertphillips@google.com
852030103e
Add newline at end of SkRRect.h
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6596 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 13:49:33 +00:00
robertphillips@google.com
5985e7c4d1
SkRoundRect start
...
https://codereview.appspot.com/6815058/
git-svn-id: http://skia.googlecode.com/svn/trunk@6595 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 13:24:55 +00:00
skia.committer@gmail.com
687c57c7d5
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6594 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 02:01:19 +00:00
reed@google.com
5e5885a63d
update dox
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6591 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-28 21:28:57 +00:00
robertphillips@google.com
629ab54066
Added dashing fast path
...
https://codereview.appspot.com/6844067/
git-svn-id: http://skia.googlecode.com/svn/trunk@6585 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-28 17:18:11 +00:00
skia.committer@gmail.com
ab38f7acb3
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6577 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-28 02:02:11 +00:00
reed@google.com
68d6bb0c11
revert prev change to reset
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6571 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-27 18:37:52 +00:00
reed@google.com
4efd9d9872
guard for self-assignment in reset()
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6568 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-27 17:20:39 +00:00
bsalomon@google.com
705e840944
Make the clip stack reduction test generate inverse filled paths.
...
Also adds some comments to GrReduceClipStack.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6847109
git-svn-id: http://skia.googlecode.com/svn/trunk@6561 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-27 15:43:57 +00:00
reed@google.com
631940c8c4
don't use bit-wise test for equality when using floats.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6557 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-27 13:13:22 +00:00
bsalomon@google.com
51a6286c24
Add a function that computes a reduced representation of the clip stack.
...
Also adds a unit test. The function is not yet used other than in the test.
Review URL: https://codereview.appspot.com/6855098
git-svn-id: http://skia.googlecode.com/svn/trunk@6553 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-26 21:19:43 +00:00
reed@google.com
971aca7557
change SkDrawFilter::filter to return a bool, where false means don't-draw
...
Review URL: https://codereview.appspot.com/6851111
git-svn-id: http://skia.googlecode.com/svn/trunk@6551 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-26 20:26:54 +00:00
reed@google.com
db3f0fda68
must always include another skia header (unless you're SkTypes.h). In this case,
...
we need SkScalar.h earlier so we can be sure to have int32_t defined.
inspired by https://codereview.appspot.com/6782122/
git-svn-id: http://skia.googlecode.com/svn/trunk@6548 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-26 20:18:00 +00:00
reed@google.com
a8a3b3d9a0
check for bad enum use when adding contours
...
Review URL: https://codereview.appspot.com/6849103
git-svn-id: http://skia.googlecode.com/svn/trunk@6547 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-26 18:16:27 +00:00
tfarina@chromium.org
223137f49d
Remove GrRandom API in favor of SkRandom.
...
TEST=tests
R=bsalomon@google.com
Review URL: https://codereview.appspot.com/6855062
git-svn-id: http://skia.googlecode.com/svn/trunk@6539 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-21 22:38:36 +00:00
sugoi@google.com
5347de1611
Simple change to remove unnecessary #define statement.
...
BUG=http://code.google.com/p/chromium/issues/detail?id=137924
TEST=TestDeferredCanvasBitmapSizeThreshold unit test
Review URL: https://codereview.appspot.com/6845071
git-svn-id: http://skia.googlecode.com/svn/trunk@6531 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-21 16:44:45 +00:00