Commit Graph

771 Commits

Author SHA1 Message Date
bsalomon@google.com
3723a484af Clean up geterror / log macros and globals for debugging. disable geterror in chrome by default.
Review URL: http://codereview.appspot.com/4170058/

git-svn-id: http://skia.googlecode.com/svn/trunk@810 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-17 21:47:25 +00:00
ctguil@chromium.org
57c2b1de23 Set fLastGlyphID in SkFontHost::GetAdvancedTypefaceMetrics for windows.
Review URL: http://codereview.appspot.com/4178060

git-svn-id: http://skia.googlecode.com/svn/trunk@809 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-17 20:41:10 +00:00
bsalomon@google.com
c6cf72381b Hide alloc size vs content size below API
Remove old gl shaders class
Move texture matrix to sampler class

git-svn-id: http://skia.googlecode.com/svn/trunk@808 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-17 16:43:10 +00:00
reed@google.com
dbbdad7051 initial baseline for linux blurs, poly2poly, points
git-svn-id: http://skia.googlecode.com/svn/trunk@807 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-17 15:31:12 +00:00
reed@google.com
a965a15abd add test for points
git-svn-id: http://skia.googlecode.com/svn/trunk@806 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-17 15:06:52 +00:00
reed@google.com
67981c5e4b add test for poly2poly
git-svn-id: http://skia.googlecode.com/svn/trunk@805 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-17 14:21:01 +00:00
reed@google.com
e344564ae8 need to apply the prepathmatrix (or perhaps push it on our mv stack)
git-svn-id: http://skia.googlecode.com/svn/trunk@804 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-16 23:20:39 +00:00
reed@google.com
c96e5c2720 add new test for blurs
git-svn-id: http://skia.googlecode.com/svn/trunk@803 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-16 21:50:04 +00:00
reed@google.com
0c219b68eb upload generated mask for maskfilter to gpu (does not work with complex-paints yet)
git-svn-id: http://skia.googlecode.com/svn/trunk@802 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-16 21:31:18 +00:00
reed@google.com
6930285b73 first steps for supporting maskfilters (disabled right now)
git-svn-id: http://skia.googlecode.com/svn/trunk@801 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-16 18:08:07 +00:00
bsalomon@google.com
86afc2ae27 Batch consecutive draw rects.
Review URL: http://codereview.appspot.com/4178057/

git-svn-id: http://skia.googlecode.com/svn/trunk@800 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-16 16:12:19 +00:00
reed@google.com
f08a44980b add initial linux baseline images for gm (still need gpu backend)
git-svn-id: http://skia.googlecode.com/svn/trunk@799 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-16 13:59:33 +00:00
reed@google.com
0ecc2b79db add text
git-svn-id: http://skia.googlecode.com/svn/trunk@798 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-16 13:06:15 +00:00
reed@google.com
369ca40621 fix compile error for linux
git-svn-id: http://skia.googlecode.com/svn/trunk@797 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-15 16:21:24 +00:00
reed@google.com
e686322eba add no-check version of SkPackARGB32, for callers that want to deliberately
build a SkPMColor that may not be valid premultiplied (e.g. compatibility
with webgl)

see https://bugs.webkit.org/show_bug.cgi?id=54023



git-svn-id: http://skia.googlecode.com/svn/trunk@796 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-15 14:22:19 +00:00
vandebo@chromium.org
564e46f19d Fix file modes.
Review URL: http://codereview.appspot.com/4178051

git-svn-id: http://skia.googlecode.com/svn/trunk@790 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-14 23:44:18 +00:00
vandebo@chromium.org
6f72d1eacd Provide windows font host implementation needed to support TrueType text in pdf backend.
- Move AdvanceMetric template functions into new file SkAdvancedTypefaceMetrics.cpp

Review URL: http://codereview.appspot.com/4174041

git-svn-id: http://skia.googlecode.com/svn/trunk@789 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-14 23:19:59 +00:00
bsalomon@google.com
97b624529c Fix param order in setVertexSourceToBuffer calls due to r786 when GR_STATIC_RECT_VB is 1
Review URL: http://codereview.appspot.com/4179047/

git-svn-id: http://skia.googlecode.com/svn/trunk@788 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-14 18:27:55 +00:00
reed@google.com
09053444ad fix compile-error, mismatch between fontID and id
http://code.google.com/p/skia/issues/detail?id=149



git-svn-id: http://skia.googlecode.com/svn/trunk@787 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-14 17:02:29 +00:00
bsalomon@google.com
1c13c9668a Refactor how Gr handles vertex and index data. GrGpu and GrInOrderDrawBuffer both GrBufferAllocPool to manage reserved and set-to-array vertex and index data.
rietveld issue 4188049

git-svn-id: http://skia.googlecode.com/svn/trunk@786 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-14 16:51:21 +00:00
bsalomon@google.com
dd53d91b60 safeUnref() -> SkSafeUnref()
git-svn-id: http://skia.googlecode.com/svn/trunk@785 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-13 18:21:16 +00:00
bsalomon@google.com
1b7c1b6fa8 Remove debugging printf that was accidentally left in 783.
git-svn-id: http://skia.googlecode.com/svn/trunk@784 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-11 14:45:11 +00:00
bsalomon@google.com
7acdb8e1d2 git-svn-id: http://skia.googlecode.com/svn/trunk@783 2bbb7eff-a529-9590-31e7-b0007b416f81 2011-02-11 14:07:02 +00:00
vandebo@chromium.org
9db446a5b6 Use real glyph IDs in the win fonthost to better support pdf.
Review URL: http://codereview.appspot.com/4142044

git-svn-id: http://skia.googlecode.com/svn/trunk@782 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-10 21:04:34 +00:00
reed@google.com
fb56a9ee2d add 'c' command, which toggles a semi-complex clip (the pink is what has been
clipped out).



git-svn-id: http://skia.googlecode.com/svn/trunk@781 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-10 18:47:24 +00:00
reed@android.com
d413445531 update to work correctly for scalar == fixed or float
git-svn-id: http://skia.googlecode.com/svn/trunk@780 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-09 02:24:26 +00:00
vandebo@chromium.org
337490d4ae Remove extra stub definition of GetAdvancedTypefaceMetrics.
BUG=140
TEST=NONE

Review URL: http://codereview.appspot.com/4150043

git-svn-id: http://skia.googlecode.com/svn/trunk@779 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-09 00:10:29 +00:00
reed@google.com
6fb7e2e153 reformatting to match coding style -- no logic changes
git-svn-id: http://skia.googlecode.com/svn/trunk@778 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-08 22:22:52 +00:00
bsalomon@google.com
9695921824 safeunref method to SkSafeUnref.
git-svn-id: http://skia.googlecode.com/svn/trunk@777 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-08 22:03:36 +00:00
reed@google.com
91a2ae988e reformat for coding style, no logic changes
git-svn-id: http://skia.googlecode.com/svn/trunk@776 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-08 21:59:59 +00:00
reed@google.com
077910e20c add SkScalarIsFinite(), and use it for a more portable impl of SkRect::isValidCoords()
git-svn-id: http://skia.googlecode.com/svn/trunk@775 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-08 21:56:39 +00:00
vandebo@chromium.org
4854327772 [PDF] Add support for xfermodes / blend modes.
- Change SkGraphicState to track and set the blend mode (xfermode) for modes built in to PDF (non porter duff modes + src over).
- Add SkXfermode::asMode() to retrieve xfermode as an enum for non porter duff modes.
- Move SkXfermode.cpp around a bit to support asMode() -- Generally move utility functions toward the top of the file.
- Make SkPDFFormXObject an isolated transparency group, as it used for saveLayer, which draws on transparent, not the device background.
- Set the graphic state in drawDevice and drawBitmap in order to get the right xfermode and alpha.

Review URL: http://codereview.appspot.com/4131043

git-svn-id: http://skia.googlecode.com/svn/trunk@774 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-08 19:28:07 +00:00
vandebo@chromium.org
79ac4fd6eb [PDF] Change SkPDFFormXObject to not hold a reference to device.
This prevents two copies of the content stream from sticking around.  It also fixes an invalid memory reference because SkCanvas::internalRestore deletes the device (maybe it should just unref) after drawing it onto the main device.

Review URL: http://codereview.appspot.com/4080056

git-svn-id: http://skia.googlecode.com/svn/trunk@773 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-08 19:22:40 +00:00
reed@google.com
3dd42b3c87 update dox for readPixels()
git-svn-id: http://skia.googlecode.com/svn/trunk@772 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 22:44:43 +00:00
reed@google.com
88daf2803a check for SK_BUILD_FOR_BREW
git-svn-id: http://skia.googlecode.com/svn/trunk@771 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 20:05:49 +00:00
reed@google.com
c332b3f15d add
git-svn-id: http://skia.googlecode.com/svn/trunk@770 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 20:01:58 +00:00
reed@google.com
3e1313cf43 add
git-svn-id: http://skia.googlecode.com/svn/trunk@769 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 20:00:40 +00:00
reed@google.com
62047cf198 clear the convex-hint in reset() and rewind(), to match its state in a newly
created path.

todo: convexity perhaps should be tristate: yes, no, unknown



git-svn-id: http://skia.googlecode.com/svn/trunk@768 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 19:39:09 +00:00
reed@google.com
b715ef7150 add rlepixelref file to make, to keep it from bit-rot
update rlepixelref to not use safeRef/safeUnref (as those are gone now)



git-svn-id: http://skia.googlecode.com/svn/trunk@767 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 19:19:46 +00:00
reed@google.com
534240f605 hide divide-by-zero from the compiler, to avoid the warning
git-svn-id: http://skia.googlecode.com/svn/trunk@766 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 19:08:59 +00:00
wjmaclean@chromium.org
ff1ec2f1a8 Add unit test for SkRect::hasValidCoordinates().
git-svn-id: http://skia.googlecode.com/svn/trunk@765 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 17:48:40 +00:00
wjmaclean@chromium.org
116b2bcd2c Proposed fix for crash in Cr70244.
git-svn-id: http://skia.googlecode.com/svn/trunk@764 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 17:48:37 +00:00
reed@google.com
57e6a5342e rebase gpu images (based on mac-desktop gpu)
really need a better way to compare gpu images, given that different gpus can
legitimately hit different pixels :(



git-svn-id: http://skia.googlecode.com/svn/trunk@763 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 15:35:36 +00:00
reed@google.com
82065d667f remove SkRefCnt safeRef() and safeUnref(), and replace the call-sites with
SkSafeRef() and SkSafeUnref().

This is basically a bug waiting to happen. An optimizing compiler can remove
checks for null on "this" if it chooses. However, SkRefCnt::safeRef() relies on
precisely this check...

void SkRefCnt::safeRef() {
    if (this) {
        this->ref();
    }
}

Since a compiler might skip the if-clause, it breaks the intention of this
method, hence its removal.

static inline void SkSafeRef(SkRefCnt* obj) {
    if (obj) {
        obj->ref();
    }
}

This form is not ignored by an optimizing compile, so we use it instead.




git-svn-id: http://skia.googlecode.com/svn/trunk@762 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 15:30:46 +00:00
bsalomon@google.com
18908aacf3 When we create the GL context and FBO on mac for the GM test also setup the viewport and clear the stencil.
In GrGpuGL::readPixels make sure current rendertarget has been made current in GL before calling glReadPixels



git-svn-id: http://skia.googlecode.com/svn/trunk@761 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 14:51:55 +00:00
reed@google.com
b89a643b69 fix warning about size_t >= 0 (which must always be true)
git-svn-id: http://skia.googlecode.com/svn/trunk@760 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 13:20:30 +00:00
vandebo@chromium.org
686abdfab0 [PDF] Improve PDF support in gm.
Currently gm ends up writing the same PDF four times.  This fixes that problem, making PDF a first class citizen and providing a better framework for additional backends.  Read support for PDF is still missing though.

Review URL: http://codereview.appspot.com/4130045

git-svn-id: http://skia.googlecode.com/svn/trunk@759 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-03 23:00:40 +00:00
vandebo@chromium.org
c3a2ae5823 Improve usability of SkAdvancedTypefaceMetrics for non PDF cases.
Change the code to fill out the metrics even if the font isn't embeddable. Previously, if the font wasn't embeddable, the code would set the type to not embeddable and return without filling out the rest of the metrics.

Review URL: http://codereview.appspot.com/3973053

git-svn-id: http://skia.googlecode.com/svn/trunk@758 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-03 21:48:23 +00:00
vandebo@chromium.org
1aef2ed83c [PDF] Start from an identity transform for drawDevice.
drawDevice, like drawSprite should start from the identity transform instead of applying the passed translation on top of the current transform.

Review URL: http://codereview.appspot.com/4023066

git-svn-id: http://skia.googlecode.com/svn/trunk@757 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-03 21:46:10 +00:00
bsalomon@google.com
1962832771 Fix warnings on linux build (strict aliasing, cons init order, vars used only in asserts)
git-svn-id: http://skia.googlecode.com/svn/trunk@756 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-03 21:30:17 +00:00