aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPaint.cpp
Commit message (Collapse)AuthorAge
* add debugging test for building SkDescriptorGravatar reed@google.com2011-05-04
| | | | | | | | update some samples git-svn-id: http://skia.googlecode.com/svn/trunk@1237 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstream android changes.Gravatar djsollen@google.com2011-04-15
| | | | | | | reviewed by: reed git-svn-id: http://skia.googlecode.com/svn/trunk@1134 2bbb7eff-a529-9590-31e7-b0007b416f81
* add filterTextFlags() to SkDevice (virtual) to allow device subclasses toGravatar reed@google.com2011-03-15
| | | | | | | | | filter what text features we try to use. The filtering allows for implementation limitations to dictate when we turn off certain text features. git-svn-id: http://skia.googlecode.com/svn/trunk@943 2bbb7eff-a529-9590-31e7-b0007b416f81
* Don't use LCD16 if SK_SUPPORT_LCDTEXT is defined (for compatibility)Gravatar reed@google.com2011-03-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@928 2bbb7eff-a529-9590-31e7-b0007b416f81
* check-point for kLCD16_Format mask supportGravatar reed@google.com2011-03-10
| | | | | | | | disabled for now in SkPaint.cpp (for further testing) git-svn-id: http://skia.googlecode.com/svn/trunk@917 2bbb7eff-a529-9590-31e7-b0007b416f81
* merge from android tree:Gravatar djsollen@google.com2011-02-23
| | | | | | | | | | | | | - optional parameters added to descriptorProc and allocPixels - clip options to image decoders - check for xfermode in blitter_a8 - UNROLL loops in blitrow reviewed by reed@google.com git-svn-id: http://skia.googlecode.com/svn/trunk@841 2bbb7eff-a529-9590-31e7-b0007b416f81
* reformatting to match coding style -- no logic changesGravatar reed@google.com2011-02-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@778 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkRefCnt safeRef() and safeUnref(), and replace the call-sites withGravatar reed@google.com2011-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix build for scalar==fixedGravatar reed@google.com2011-01-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@671 2bbb7eff-a529-9590-31e7-b0007b416f81
* merge with changes for GPU backendGravatar reed@android.com2010-12-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@637 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow zero text size to be specified for an SkPaint.Gravatar vandebo@chromium.org2010-11-17
| | | | | | | | | | | | We have to support zero sized fonts and generate correct metrics to pass Acid3. There don't seem to be any requirements that textsize be >0, just that it not be negative. Original issue: http://codereview.appspot.com/3174041/ Review URL: http://codereview.appspot.com/3176042 git-svn-id: http://skia.googlecode.com/svn/trunk@626 2bbb7eff-a529-9590-31e7-b0007b416f81
* PDF: Add text support with a font framework (font embedding to come).Gravatar vandebo@chromium.org2010-11-11
| | | | | | | | | | | | Supports fakeBold, underline, strikethrough, mode (fill, stroke, both), size, skew, alignment (left, center, right). Missing is drawFontOnPath and font lookup and embedding. Changed SkPDFString to support how it is used from drawText methods. Moved compile assert into SkTypes. Moved constants and utility function used to support fakeBold, underline, and strikethrough into higher level locations. Review URL: http://codereview.appspot.com/2946041 git-svn-id: http://skia.googlecode.com/svn/trunk@624 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add support for forcing autohinting.Gravatar agl@chromium.org2010-06-17
| | | | | | http://codereview.appspot.com/1651044/show git-svn-id: http://skia.googlecode.com/svn/trunk@580 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix 64-bit Mac warnings/memory corruptionGravatar reed@android.com2010-05-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@569 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix maxWidth when using linear-textGravatar reed@android.com2010-05-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@565 2bbb7eff-a529-9590-31e7-b0007b416f81
* use 64bit intermediate to accumulate 16.16 widths, to avoid overflowGravatar reed@android.com2010-03-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@531 2bbb7eff-a529-9590-31e7-b0007b416f81
* This patch allows the use of the native FreeType emboldeningGravatar senorblanco@chromium.org2010-02-05
| | | | | | | | | | | | algorithm when "fake bold" text is used in SkPaint. It's enabled by #defining SK_USE_FREETYPE_EMBOLDEN. Review URL: http://codereview.appspot.com/198077 git-svn-id: http://skia.googlecode.com/svn/trunk@490 2bbb7eff-a529-9590-31e7-b0007b416f81
* add containsText() apiGravatar reed@android.com2010-02-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@487 2bbb7eff-a529-9590-31e7-b0007b416f81
* skia: Always use aliased text when antialiasing is disabled.Gravatar agl@chromium.org2010-01-21
| | | | | | | | | | | | | | | | | Otherwise, people who have antialiasing disabled end up with subpixel rendering if the subpixel setting happens to be set to something other than "none". This change's interpretation of these overlapping settings seems to be consistent with GTK's and Firefox's. Patch-by: Dan Erat Signed-off-by: Adam Langley BUG=http://code.google.com/p/chromium/issues/detail?id=28382 http://codereview.appspot.com/186248 git-svn-id: http://skia.googlecode.com/svn/trunk@475 2bbb7eff-a529-9590-31e7-b0007b416f81
* add glyph->unichar query (inverse of a cmap)Gravatar reed@android.com2010-01-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@472 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix r466 which was causing Chromium valgrind failures.Gravatar agl@chromium.org2010-01-04
| | | | | | | | See the added comment for details. TBR=reed (since it's a build fix) git-svn-id: http://skia.googlecode.com/svn/trunk@469 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add flag to enable bitmap strikes.Gravatar agl@chromium.org2010-01-04
| | | | | | http://codereview.appspot.com/183096 git-svn-id: http://skia.googlecode.com/svn/trunk@466 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warning in samplerGravatar reed@android.com2009-08-24
| | | | | | | | | lock pixels when we extract alpha disabling hinting when linear-text is set git-svn-id: http://skia.googlecode.com/svn/trunk@333 2bbb7eff-a529-9590-31e7-b0007b416f81
* bzero SkPaint in its constructor, to allow us to cleanly use memcmp in ourGravatar reed@android.com2009-08-13
| | | | | | | | operator==, given that we may be padded and not know how to init those pad bytes git-svn-id: http://skia.googlecode.com/svn/trunk@321 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkFontHost::FilterRect() which allows the font host to filter our requestGravatar reed@android.com2009-07-22
| | | | | | | | | | before we turn it into a font-cache entry, for the cases where the scaler will ignore and/or collapse certain feature requests (e.g. doesn't support all levels of hinting) git-svn-id: http://skia.googlecode.com/svn/trunk@283 2bbb7eff-a529-9590-31e7-b0007b416f81
* rename SK_BUILD_SUBPIXEL to SK_SUPPORT_LCDTEXT to better match the name of theGravatar reed@android.com2009-07-22
| | | | | | | | | | | | feature (since we already have subpixel text support) fix some debug-compile problems update Makefile for lcd files git-svn-id: http://skia.googlecode.com/svn/trunk@282 2bbb7eff-a529-9590-31e7-b0007b416f81
* Subpixel glyph rendering support.Gravatar agl@chromium.org2009-07-21
| | | | | | | | | | | | | | | | This patch adds support for rendering subpixel glyphs (using Freetype). In order to control this rendering see SkPaint::setLCDRenderText in SkPaint.h. To setup the LCD mode, see SkFontHost::SetSubpixelOrientation and SkFontHost::SetSubpixelOrder in SkFontHost.h. This patch also adds more fine grained control over hinting (again, only for Freetype currently). One can now control the hinting with SkPaint::setHinting. git-svn-id: http://skia.googlecode.com/svn/trunk@275 2bbb7eff-a529-9590-31e7-b0007b416f81
* detect nearly translate-only matrices when drawing bitmaps (for speed)Gravatar reed@android.com2009-06-24
| | | | | | | | | rename setXfermode(Mode) to setXfermodeMode(Mode) for sanity fix memory leak in setXfermode(Mode) git-svn-id: http://skia.googlecode.com/svn/trunk@239 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix memory leak in new setXfermode()Gravatar reed@android.com2009-06-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@238 2bbb7eff-a529-9590-31e7-b0007b416f81
* move xfermode modes from porterduff into xfermode itselfGravatar reed@android.com2009-06-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@232 2bbb7eff-a529-9590-31e7-b0007b416f81
* API change: SkPath computeBounds -> getBoundsGravatar reed@android.com2009-04-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@140 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkChunkAlloc::unalloc() to undo the last allocation, useful if the ↵Gravatar reed@android.com2009-03-30
| | | | | | | | | | | caller wants to treat the allocats like temp memory (see PictureRecord) Call unalloc if a paint (or other cached object) is already in our list for picture recording Use correct CompareType macro in SkCanvas::quickReject git-svn-id: http://skia.googlecode.com/svn/trunk@138 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warningsGravatar reed@android.com2009-01-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@68 2bbb7eff-a529-9590-31e7-b0007b416f81
* grab from latest androidGravatar reed@android.com2008-12-17
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81