bsalomon@google.com [Thu, 17 Feb 2011 16:43:10 +0000 (16:43 +0000)]
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
reed@google.com [Thu, 17 Feb 2011 15:31:12 +0000 (15:31 +0000)]
initial baseline for linux blurs, poly2poly, points
git-svn-id: http://skia.googlecode.com/svn/trunk@807
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Thu, 17 Feb 2011 15:06:52 +0000 (15:06 +0000)]
add test for points
git-svn-id: http://skia.googlecode.com/svn/trunk@806
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Thu, 17 Feb 2011 14:21:01 +0000 (14:21 +0000)]
add test for poly2poly
git-svn-id: http://skia.googlecode.com/svn/trunk@805
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 16 Feb 2011 23:20:39 +0000 (23:20 +0000)]
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
reed@google.com [Wed, 16 Feb 2011 21:50:04 +0000 (21:50 +0000)]
add new test for blurs
git-svn-id: http://skia.googlecode.com/svn/trunk@803
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 16 Feb 2011 21:31:18 +0000 (21:31 +0000)]
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
reed@google.com [Wed, 16 Feb 2011 18:08:07 +0000 (18:08 +0000)]
first steps for supporting maskfilters (disabled right now)
git-svn-id: http://skia.googlecode.com/svn/trunk@801
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Wed, 16 Feb 2011 16:12:19 +0000 (16:12 +0000)]
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
reed@google.com [Wed, 16 Feb 2011 13:59:33 +0000 (13:59 +0000)]
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
reed@google.com [Wed, 16 Feb 2011 13:06:15 +0000 (13:06 +0000)]
add text
git-svn-id: http://skia.googlecode.com/svn/trunk@798
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 15 Feb 2011 16:21:24 +0000 (16:21 +0000)]
fix compile error for linux
git-svn-id: http://skia.googlecode.com/svn/trunk@797
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 15 Feb 2011 14:22:19 +0000 (14:22 +0000)]
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
vandebo@chromium.org [Mon, 14 Feb 2011 23:44:18 +0000 (23:44 +0000)]
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
vandebo@chromium.org [Mon, 14 Feb 2011 23:19:59 +0000 (23:19 +0000)]
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
bsalomon@google.com [Mon, 14 Feb 2011 18:27:55 +0000 (18:27 +0000)]
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
reed@google.com [Mon, 14 Feb 2011 17:02:29 +0000 (17:02 +0000)]
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
bsalomon@google.com [Mon, 14 Feb 2011 16:51:21 +0000 (16:51 +0000)]
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
bsalomon@google.com [Sun, 13 Feb 2011 18:21:16 +0000 (18:21 +0000)]
safeUnref() -> SkSafeUnref()
git-svn-id: http://skia.googlecode.com/svn/trunk@785
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Fri, 11 Feb 2011 14:45:11 +0000 (14:45 +0000)]
Remove debugging printf that was accidentally left in 783.
git-svn-id: http://skia.googlecode.com/svn/trunk@784
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Fri, 11 Feb 2011 14:07:02 +0000 (14:07 +0000)]
git-svn-id: skia.googlecode.com/svn/trunk@783
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Thu, 10 Feb 2011 21:04:34 +0000 (21:04 +0000)]
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
reed@google.com [Thu, 10 Feb 2011 18:47:24 +0000 (18:47 +0000)]
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
reed@android.com [Wed, 9 Feb 2011 02:24:26 +0000 (02:24 +0000)]
update to work correctly for scalar == fixed or float
git-svn-id: http://skia.googlecode.com/svn/trunk@780
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Wed, 9 Feb 2011 00:10:29 +0000 (00:10 +0000)]
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
reed@google.com [Tue, 8 Feb 2011 22:22:52 +0000 (22:22 +0000)]
reformatting to match coding style -- no logic changes
git-svn-id: http://skia.googlecode.com/svn/trunk@778
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Tue, 8 Feb 2011 22:03:36 +0000 (22:03 +0000)]
safeunref method to SkSafeUnref.
git-svn-id: http://skia.googlecode.com/svn/trunk@777
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 8 Feb 2011 21:59:59 +0000 (21:59 +0000)]
reformat for coding style, no logic changes
git-svn-id: http://skia.googlecode.com/svn/trunk@776
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 8 Feb 2011 21:56:39 +0000 (21:56 +0000)]
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
vandebo@chromium.org [Tue, 8 Feb 2011 19:28:07 +0000 (19:28 +0000)]
[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
vandebo@chromium.org [Tue, 8 Feb 2011 19:22:40 +0000 (19:22 +0000)]
[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
reed@google.com [Mon, 7 Feb 2011 22:44:43 +0000 (22:44 +0000)]
update dox for readPixels()
git-svn-id: http://skia.googlecode.com/svn/trunk@772
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Mon, 7 Feb 2011 20:05:49 +0000 (20:05 +0000)]
check for SK_BUILD_FOR_BREW
git-svn-id: http://skia.googlecode.com/svn/trunk@771
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Mon, 7 Feb 2011 20:01:58 +0000 (20:01 +0000)]
add
git-svn-id: http://skia.googlecode.com/svn/trunk@770
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Mon, 7 Feb 2011 20:00:40 +0000 (20:00 +0000)]
add
git-svn-id: http://skia.googlecode.com/svn/trunk@769
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Mon, 7 Feb 2011 19:39:09 +0000 (19:39 +0000)]
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
reed@google.com [Mon, 7 Feb 2011 19:19:46 +0000 (19:19 +0000)]
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
reed@google.com [Mon, 7 Feb 2011 19:08:59 +0000 (19:08 +0000)]
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
wjmaclean@chromium.org [Mon, 7 Feb 2011 17:48:40 +0000 (17:48 +0000)]
Add unit test for SkRect::hasValidCoordinates().
git-svn-id: http://skia.googlecode.com/svn/trunk@765
2bbb7eff-a529-9590-31e7-
b0007b416f81
wjmaclean@chromium.org [Mon, 7 Feb 2011 17:48:37 +0000 (17:48 +0000)]
Proposed fix for crash in Cr70244.
git-svn-id: http://skia.googlecode.com/svn/trunk@764
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Mon, 7 Feb 2011 15:35:36 +0000 (15:35 +0000)]
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
reed@google.com [Mon, 7 Feb 2011 15:30:46 +0000 (15:30 +0000)]
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
bsalomon@google.com [Mon, 7 Feb 2011 14:51:55 +0000 (14:51 +0000)]
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
reed@google.com [Mon, 7 Feb 2011 13:20:30 +0000 (13:20 +0000)]
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
vandebo@chromium.org [Thu, 3 Feb 2011 23:00:40 +0000 (23:00 +0000)]
[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
vandebo@chromium.org [Thu, 3 Feb 2011 21:48:23 +0000 (21:48 +0000)]
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
vandebo@chromium.org [Thu, 3 Feb 2011 21:46:10 +0000 (21:46 +0000)]
[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
bsalomon@google.com [Thu, 3 Feb 2011 21:30:17 +0000 (21:30 +0000)]
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
reed@android.com [Thu, 3 Feb 2011 15:51:56 +0000 (15:51 +0000)]
change forward decl of SkMatrix from struct (wrong) to class (correct)
fixes issue http://code.google.com/p/skia/issues/detail?id=139
git-svn-id: http://skia.googlecode.com/svn/trunk@755
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Wed, 2 Feb 2011 22:42:20 +0000 (22:42 +0000)]
Make aggressive shader opts an option in GrUserConfig.h. Currently just controls whether color=white optimization is applied (eliminates reading color varying and modulation by color). This was already a compile time option just not exposed through user config.
git-svn-id: http://skia.googlecode.com/svn/trunk@754
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Wed, 2 Feb 2011 19:24:54 +0000 (19:24 +0000)]
Make enabling static rect VB configurable by user config file.
git-svn-id: http://skia.googlecode.com/svn/trunk@753
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Wed, 2 Feb 2011 02:11:22 +0000 (02:11 +0000)]
Cleanup SkPDFTypfaceInfo and make it more generic.
Renamed to SkAdvancedTypefaceMetrics.
Include Em size and return all metrics in unscaled font units.
Make retrieval of advances optional.
Reorder SkAdvancedTypefaceMetrics to be somewhat logical.
Change the types of fields in SkAdvancedTypefaceMetrics to their minimum required size.
Review URL: http://codereview.appspot.com/4121049
git-svn-id: http://skia.googlecode.com/svn/trunk@752
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Tue, 1 Feb 2011 22:56:16 +0000 (22:56 +0000)]
Attempt to simplify NPOT texture caps. Also fixes case where textures would unnecessarily be bloated to POT. Adds setting of sampler's filter setting in paint conversion.
git-svn-id: http://skia.googlecode.com/svn/trunk@751
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Tue, 1 Feb 2011 22:19:44 +0000 (22:19 +0000)]
[PDF] Clean up ref counting.
Return ref'd objs where possible enabling removal of many SkRefPtr<> variables.
Review URL: http://codereview.appspot.com/4029051
git-svn-id: http://skia.googlecode.com/svn/trunk@750
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Tue, 1 Feb 2011 19:12:40 +0000 (19:12 +0000)]
Adds ability to draw rects using a unit square vertex buffer. Useful when matrix/uniform changes are less expensive than sending new verts.
Adds optional matrix parameters to GrContext drawRect and drawRectToRect so that non-axis-aligned matrices can be drawn using these functions.
codereview Issue 4105049
git-svn-id: http://skia.googlecode.com/svn/trunk@749
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Tue, 1 Feb 2011 01:04:00 +0000 (01:04 +0000)]
[PDF] Fix bugs preventing gm from running with PDF support.
Fix copy-paste ref counting bug.
Change NOT_IMPLEMENTED macro to only assert in debug mode.
Review URL: http://codereview.appspot.com/4080048
git-svn-id: http://skia.googlecode.com/svn/trunk@748
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Mon, 31 Jan 2011 19:35:43 +0000 (19:35 +0000)]
[PDF] Support image alpha channel plus a couple small fixes.
Fix bug in rendering paths with cubic segments.
Only compress data if the compressed size is smaller than the uncompressed size.
Review URL: http://codereview.appspot.com/4079048
git-svn-id: http://skia.googlecode.com/svn/trunk@747
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Mon, 31 Jan 2011 14:24:48 +0000 (14:24 +0000)]
initialize int var-args to placate chrome's runtime check
git-svn-id: http://skia.googlecode.com/svn/trunk@746
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Sat, 29 Jan 2011 01:38:50 +0000 (01:38 +0000)]
[PDF] Honor srcRect in drawBitmap.
Review URL: http://codereview.appspot.com/4083045
git-svn-id: http://skia.googlecode.com/svn/trunk@745
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Fri, 28 Jan 2011 22:19:22 +0000 (22:19 +0000)]
update dox on bitmap configs
document testing build-flag for large bitmaps
git-svn-id: http://skia.googlecode.com/svn/trunk@744
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Fri, 28 Jan 2011 21:28:56 +0000 (21:28 +0000)]
[PDF] Add replacement implementations for functions missing in older freetype libs.
Review URL: http://codereview.appspot.com/4043044
git-svn-id: http://skia.googlecode.com/svn/trunk@743
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Fri, 28 Jan 2011 21:21:49 +0000 (21:21 +0000)]
fix slow performance on desktops by uping our max-texture-dim from 512 to
whatever the gpu itself broadcasts.
git-svn-id: http://skia.googlecode.com/svn/trunk@742
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Fri, 28 Jan 2011 20:54:15 +0000 (20:54 +0000)]
replace UINT32_MAX with portable macro
git-svn-id: http://skia.googlecode.com/svn/trunk@741
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 26 Jan 2011 22:10:41 +0000 (22:10 +0000)]
conditionalize impl on SK_SUPPORT_PDF, to help chrome build
git-svn-id: http://skia.googlecode.com/svn/trunk@740
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Wed, 26 Jan 2011 21:59:00 +0000 (21:59 +0000)]
Fix windows build.
Review URL: http://codereview.appspot.com/3996048
git-svn-id: http://skia.googlecode.com/svn/trunk@739
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 26 Jan 2011 20:32:23 +0000 (20:32 +0000)]
move into core for now, so we can build SkFontHost_FreeType.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@738
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 26 Jan 2011 17:20:51 +0000 (17:20 +0000)]
work around framebuffer_blit confusion on linux -- better fix on the way
git-svn-id: http://skia.googlecode.com/svn/trunk@737
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 26 Jan 2011 17:11:51 +0000 (17:11 +0000)]
fix linux gpu build (don't need egl.h)
-This line, and those below, will be ignored--
M trunk/gpu/include/GrGLConfig.h
git-svn-id: http://skia.googlecode.com/svn/trunk@736
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 26 Jan 2011 15:18:33 +0000 (15:18 +0000)]
remove debugging code around gUseExt
git-svn-id: http://skia.googlecode.com/svn/trunk@735
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 26 Jan 2011 04:55:57 +0000 (04:55 +0000)]
close quotes on #error
git-svn-id: http://skia.googlecode.com/svn/trunk@734
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 26 Jan 2011 04:37:53 +0000 (04:37 +0000)]
fix mac build (don't need typedef struct foo foo)
git-svn-id: http://skia.googlecode.com/svn/trunk@733
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 26 Jan 2011 01:44:18 +0000 (01:44 +0000)]
fix warnings, including using GrTCast<> to go from &Obj -> uint32_t*
git-svn-id: http://skia.googlecode.com/svn/trunk@732
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 25 Jan 2011 23:50:57 +0000 (23:50 +0000)]
embed a refdict inside SkDevice
udate unittests to test refdict's destructor
git-svn-id: http://skia.googlecode.com/svn/trunk@731
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 25 Jan 2011 23:36:05 +0000 (23:36 +0000)]
add refdict class, for holding a dictionary of reference-counted objects
-- experimental
git-svn-id: http://skia.googlecode.com/svn/trunk@730
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Tue, 25 Jan 2011 22:06:29 +0000 (22:06 +0000)]
Update SkPDFDevice::drawPath signature to match SkDevice.
Review URL: http://codereview.appspot.com/4068044
git-svn-id: http://skia.googlecode.com/svn/trunk@729
2bbb7eff-a529-9590-31e7-
b0007b416f81
vandebo@chromium.org [Tue, 25 Jan 2011 21:01:34 +0000 (21:01 +0000)]
Add Truetype and Type 1 font embedding support
Sorry this is such a large CL. It was very exploratory for me to make this
work.
- Add an interface to SkFontHost to retrieve font information and provide NULL implementations on all platforms except Linux.
- Segment large Type 1 fonts into fonts with shared resources with 255 glyphs each.
- Convert the various Type 1 formats to the form PDF wants.
- Update font as we draw text instead of as part of the graphical state.
- Remove built-in font support, we can't really use it.
Other changes I can pull out to a separate CL if you like.
- Add SkTScopedPtr class.
- Fix double free of resources.
- Fix bug in resource unique-ifying code.
- Don't print anything for any empty clip path.
- Fix copy paste error - MiterLimit.
- Fix sign extension bug in SkPDFString
- Fix FlateTest rename that was missed on a previous commit.
Review URL: http://codereview.appspot.com/4082042
git-svn-id: http://skia.googlecode.com/svn/trunk@728
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 25 Jan 2011 19:05:12 +0000 (19:05 +0000)]
fixes for some warnings:
- #if of something that was not defined
- explicit constructor call for baseclass in copy-constructor of subclass
http://code.google.com/p/skia/issues/detail?id=112
git-svn-id: http://skia.googlecode.com/svn/trunk@727
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Tue, 25 Jan 2011 18:43:06 +0000 (18:43 +0000)]
Add SampleShaderText to vs project.
git-svn-id: http://skia.googlecode.com/svn/trunk@726
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Tue, 25 Jan 2011 18:35:26 +0000 (18:35 +0000)]
Add shaded text sample and gm test.
git-svn-id: http://skia.googlecode.com/svn/trunk@725
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 25 Jan 2011 15:24:55 +0000 (15:24 +0000)]
chrome always assumes BGRA for its textures
git-svn-id: http://skia.googlecode.com/svn/trunk@724
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 25 Jan 2011 14:55:42 +0000 (14:55 +0000)]
fix comments for U8CPU and S16CPU
http://code.google.com/p/skia/issues/detail?id=113
git-svn-id: http://skia.googlecode.com/svn/trunk@723
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Mon, 24 Jan 2011 18:19:55 +0000 (18:19 +0000)]
Add GrGpuGLShaders2 to gr_files.mk
git-svn-id: http://skia.googlecode.com/svn/trunk@722
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Mon, 24 Jan 2011 17:41:47 +0000 (17:41 +0000)]
Increase number of stages from 1 to 2
Move GrTextContext from stage 0 to stage 1 so it doesn't conflict with GrPaint (allow textured text)
Switch to dynamically generated shaders
git-svn-id: http://skia.googlecode.com/svn/trunk@721
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Fri, 21 Jan 2011 22:08:29 +0000 (22:08 +0000)]
make xfermode warning printf be debug-only
git-svn-id: http://skia.googlecode.com/svn/trunk@720
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Fri, 21 Jan 2011 22:04:38 +0000 (22:04 +0000)]
fix release build
git-svn-id: http://skia.googlecode.com/svn/trunk@719
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Fri, 21 Jan 2011 21:03:59 +0000 (21:03 +0000)]
Rev the GrContext interface. Context has draw* functions that take a new GrPaint object. Removed many of the lower-level GrGpu function call-throughs on context.
Remove unused/unsupported point size (we don't draw non-hairline points using GL points).
Change current* getter functions to get* for consistency.
Fix bounds when drawing inverse-filled paths.
git-svn-id: http://skia.googlecode.com/svn/trunk@718
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Thu, 20 Jan 2011 14:13:13 +0000 (14:13 +0000)]
In GrMatrix's setScale, setSkew, & setTranslate check whether the values passed in make the matrix identity before setting the typemask.
git-svn-id: http://skia.googlecode.com/svn/trunk@717
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Thu, 20 Jan 2011 02:18:00 +0000 (02:18 +0000)]
replace GR_GL(GetIntegerv with GR_GL_GetIntegerv to ensure that we zero-init
the var-arg (needed for chrome)
git-svn-id: http://skia.googlecode.com/svn/trunk@716
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 19 Jan 2011 19:04:04 +0000 (19:04 +0000)]
update chrome-specific glconfig (should make versions of this for mac/win/linux)
git-svn-id: http://skia.googlecode.com/svn/trunk@715
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 19 Jan 2011 17:35:08 +0000 (17:35 +0000)]
add experimental custom GL header for chrome
git-svn-id: http://skia.googlecode.com/svn/trunk@714
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Wed, 19 Jan 2011 17:19:40 +0000 (17:19 +0000)]
Cleanup including of GL headers and provide way to include custom headers, extension getter.
git-svn-id: http://skia.googlecode.com/svn/trunk@713
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 19 Jan 2011 14:30:26 +0000 (14:30 +0000)]
fix fEntryCount when we purge a cache entry (bug caught by our validate())
git-svn-id: http://skia.googlecode.com/svn/trunk@712
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 19 Jan 2011 13:19:27 +0000 (13:19 +0000)]
document new (temporary) build flags
git-svn-id: http://skia.googlecode.com/svn/trunk@711
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Wed, 19 Jan 2011 13:15:36 +0000 (13:15 +0000)]
add compile flag GR_SKIP_2POINTRADIAL_PROGRAMS to ignore the 2point-radial
shader programs (for now), which have problematic on some GPUs
git-svn-id: http://skia.googlecode.com/svn/trunk@710
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 18 Jan 2011 21:50:41 +0000 (21:50 +0000)]
add getter/setter for TextureCache, so that clients can make their budget
decisions at runtime or per-context, rather than just at compile-time. Leaving
in the default values as is.
git-svn-id: http://skia.googlecode.com/svn/trunk@709
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 18 Jan 2011 21:32:14 +0000 (21:32 +0000)]
add GR_BUILD_CHROME for now. hopefully we can replace it with other,
non-chrome-specific refactoring to accomodate those differences.
git-svn-id: http://skia.googlecode.com/svn/trunk@708
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 18 Jan 2011 21:05:42 +0000 (21:05 +0000)]
add new 2nd argument for rendertarget to SkGpuCanvas
git-svn-id: http://skia.googlecode.com/svn/trunk@707
2bbb7eff-a529-9590-31e7-
b0007b416f81
bsalomon@google.com [Tue, 18 Jan 2011 20:57:22 +0000 (20:57 +0000)]
Remove notion of default rendertarget. This doesn't map well to usage patterns outside sample app. Make binding between SkGpuDevice and a GrRenderTarget more explicit. Create method on GrContext to wrap the current target in the 3D API with a GrRenderTarget.
git-svn-id: http://skia.googlecode.com/svn/trunk@706
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 18 Jan 2011 20:55:57 +0000 (20:55 +0000)]
detect empty/inverted rect before using autobounds helper (as with prev. rev.)
git-svn-id: http://skia.googlecode.com/svn/trunk@705
2bbb7eff-a529-9590-31e7-
b0007b416f81
reed@google.com [Tue, 18 Jan 2011 20:35:51 +0000 (20:35 +0000)]
don't use SkAutoPathBoundsUpdate until after we've checked for degenerate
dimensions, otherwise we might set the bounds, only to then abort and not
set any points.
Fixes assert if you call addRoundRect(r, 10, 10) when r is inverted
(i.e. r.fLeft > r.fRight)
git-svn-id: http://skia.googlecode.com/svn/trunk@704
2bbb7eff-a529-9590-31e7-
b0007b416f81