aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkDraw.cpp
Commit message (Collapse)AuthorAge
* use AsMode instead of deprecated IsModeGravatar mike@reedtribe.org2011-11-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2705 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update files to use SK_BUILD_FOR_ANDROID.Gravatar djsollen@google.com2011-11-08
| | | | | | | | This CL also removes any unecessary references to the ANDROID definition. Review URL: http://codereview.appspot.com/5354049 git-svn-id: http://skia.googlecode.com/svn/trunk@2629 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove warnings (trailing \, signed vs unsigned, parenthesization).Gravatar tomhudson@google.com2011-10-27
| | | | | | | | Convert some tabs into spaces. git-svn-id: http://skia.googlecode.com/svn/trunk@2541 2bbb7eff-a529-9590-31e7-b0007b416f81
* enable soft clipping (yikes)Gravatar reed@google.com2011-10-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2515 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkAutoMaskImage so that we're less likely to write leaky code.Gravatar bungeman@google.com2011-10-04
| | | | | | | http://codereview.appspot.com/5180047/ git-svn-id: http://skia.googlecode.com/svn/trunk@2409 2bbb7eff-a529-9590-31e7-b0007b416f81
* quick-rejects based on xfermode, using SkPaint::nothingToDraw()Gravatar reed@google.com2011-10-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2402 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix 2333. Be sure fImage is assigned before giving to SkAutoMaskImage.Gravatar bungeman@google.com2011-09-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2334 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix leak of mask in draw.Gravatar bungeman@google.com2011-09-26
| | | | | | | http://codereview.appspot.com/5132046/ git-svn-id: http://skia.googlecode.com/svn/trunk@2333 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert match for newAlpha to exactly match old math, so we don't driveGravatar reed@google.com2011-09-19
| | | | | | | | dumprendertree crazy git-svn-id: http://skia.googlecode.com/svn/trunk@2287 2bbb7eff-a529-9590-31e7-b0007b416f81
* use new SkDrawTreatAsHairline method to decide when to approximate a thin-lineGravatar reed@google.com2011-09-19
| | | | | | | | | | with a hairline (and have its alpha modulated). idea is to be able to share this new function with SkGpuDevice git-svn-id: http://skia.googlecode.com/svn/trunk@2283 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reduce size of filter mask.Gravatar bungeman@google.com2011-09-02
| | | | | | | | | http://codereview.appspot.com/4965057/ Reduce the size of filter masks, fix HQ blur when clipped, and add tests. git-svn-id: http://skia.googlecode.com/svn/trunk@2211 2bbb7eff-a529-9590-31e7-b0007b416f81
* respect subpixel positioningGravatar reed@google.com2011-08-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2165 2bbb7eff-a529-9590-31e7-b0007b416f81
* Gpu can draw underlined text.Gravatar bungeman@google.com2011-08-22
| | | | | | | http://codereview.appspot.com/4919047/ git-svn-id: http://skia.googlecode.com/svn/trunk@2154 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow the y-baseline to float except when text is horizontal, as we were alreadyGravatar reed@google.com2011-08-22
| | | | | | | | | doing for the gpu case. Note: drawPosText was already behaving this way, this change just brings drawText into line with drawPosText. git-svn-id: http://skia.googlecode.com/svn/trunk@2152 2bbb7eff-a529-9590-31e7-b0007b416f81
* Include <new> required for placement new in SkTLazy.Gravatar bungeman@google.com2011-07-28
| | | | | | | Also, add SkTLazy to gyp and remove old includes. git-svn-id: http://skia.googlecode.com/svn/trunk@1984 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* include <new> for SkTLazy, since windows seems to need it.Gravatar reed@google.com2011-07-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1976 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't modify a const paintGravatar reed@google.com2011-07-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1974 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't modify const SkDraw, since multiple threads may be watching it...Gravatar reed@google.com2011-07-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1954 2bbb7eff-a529-9590-31e7-b0007b416f81
* don/t modify const paint, since it could be used in different threadsGravatar reed@google.com2011-07-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1953 2bbb7eff-a529-9590-31e7-b0007b416f81
* defer allocating blitter until we know we need it (i.e. gpu-devices don't need,Gravatar reed@google.com2011-07-05
| | | | | | | | which they signal by setting a custom D1G proc) git-svn-id: http://skia.googlecode.com/svn/trunk@1791 2bbb7eff-a529-9590-31e7-b0007b416f81
* Increase use of SkMatrix::hasPerspective(), merge in has_perspective().Gravatar tomhudson@google.com2011-06-06
| | | | | | | | Unifies SkMatrix::hasPerspective(), has_perspective(), and manual tests of SkMatrix::getType & kPerspective_Mask. git-svn-id: http://skia.googlecode.com/svn/trunk@1517 2bbb7eff-a529-9590-31e7-b0007b416f81
* unbias fy in the gpu glyphproc, since skia has pre-added 1/2 to the valueGravatar reed@google.com2011-04-08
| | | | | | | | | | | (assuming we would call floor to get a rounded value.) apply finalFYMask not to the initial fy, but to the fyMask (so it is always applied in the loop) in drawText. git-svn-id: http://skia.googlecode.com/svn/trunk@1084 2bbb7eff-a529-9590-31e7-b0007b416f81
* export SkDraw::ComputeRectType() and share that with SkGpuDeviceGravatar reed@google.com2011-04-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1055 2bbb7eff-a529-9590-31e7-b0007b416f81
* handle scale < 0 for stroke-rectsGravatar reed@google.com2011-04-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1052 2bbb7eff-a529-9590-31e7-b0007b416f81
* reenable fast stroked rects, now that we correctly handle non-square scaleGravatar reed@google.com2011-04-04
| | | | | | | | also, degenerate non-antialias rectangles now draw properly git-svn-id: http://skia.googlecode.com/svn/trunk@1049 2bbb7eff-a529-9590-31e7-b0007b416f81
* temporarily disable fast stroking, until we handle non-square scales in matrixGravatar reed@google.com2011-04-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1047 2bbb7eff-a529-9590-31e7-b0007b416f81
* add #ifdef SK_DISABLE_FAST_AA_STROKE_RECT to disable new 8x faster antialiasedGravatar reed@google.com2011-04-04
| | | | | | | | | stroked rects, since it draws slightly different (more correct) pixels, for clients that want pixel compatibility. git-svn-id: http://skia.googlecode.com/svn/trunk@1043 2bbb7eff-a529-9590-31e7-b0007b416f81
* faster stroke rectsGravatar mike@reedtribe.org2011-04-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1042 2bbb7eff-a529-9590-31e7-b0007b416f81
* Initialize fClip in SkBounder, in case doIRect() is called before it is usedGravatar reed@google.com2011-03-23
| | | | | | | | | | inside a canvas (which calls setClip). Export a global empty region. Used by SkBounder's constructor. git-svn-id: http://skia.googlecode.com/svn/trunk@985 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstreaming changes from android.Gravatar djsollen@google.com2011-03-14
| | | | | | | | | | - fix compile warnings in the GPU code - upstream android specific code (ifdef protected) - fail gracefully when a custom allocator fails git-svn-id: http://skia.googlecode.com/svn/trunk@936 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
* If you #define SK_ALLOW_OVER_32K_BITMAPS, then skia will try to draw bitmapsGravatar reed@google.com2011-01-13
| | | | | | | | | | whose dimensions exceed 32K. In my testing, this is fine, but I'm coding this as an opt-in feature for now, to allow for more testing before its enabled by default. git-svn-id: http://skia.googlecode.com/svn/trunk@693 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
* 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
* Fix SkDraw::validate to work with vector Devices.Gravatar vandebo@chromium.org2010-10-26
| | | | | | | | Vector devices don't have a (valid) fBitmap, so pass in width and height. Review URL: http://codereview.appspot.com/2718041 git-svn-id: http://skia.googlecode.com/svn/trunk@616 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "Use hairline when line width <= 1.0, instead of < 1.0.""Gravatar agl@chromium.org2010-04-27
| | | | | | | This reverts commit r560. Chromium has landed at r560, so I'm applying the revert-revert. (See the comments in r560 for details.) git-svn-id: http://skia.googlecode.com/svn/trunk@561 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Use hairline when line width <= 1.0, instead of < 1.0."Gravatar agl@chromium.org2010-04-26
| | | | | | | | | This reverts commit r538 for the moment. In order to roll Chrome to include some bug fixes, I want to land it in between this revert, and the revert revert. That way the baseline changes from the other revisions can be considered without conflating the huge number of changes due to r538. git-svn-id: http://skia.googlecode.com/svn/trunk@560 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use hairline when line width <= 1.0, instead of < 1.0.Gravatar anatoly@google.com2010-04-12
| | | | | | | | | | | This speeds line drawing up considerably when drawing with default linewidth on canvas. Review: http://codereview.appspot.com/883047/show git-svn-id: http://skia.googlecode.com/svn/trunk@538 2bbb7eff-a529-9590-31e7-b0007b416f81
* if we're strokeandfill+hairline, just draw fill (they way paths do) insteadGravatar reed@android.com2010-03-25
| | | | | | | | of just hairline stroking (bad) git-svn-id: http://skia.googlecode.com/svn/trunk@533 2bbb7eff-a529-9590-31e7-b0007b416f81
* convert matrix <--> matrix44Gravatar reed@android.com2010-03-01
| | | | | | | | add glyphrec to bounder git-svn-id: http://skia.googlecode.com/svn/trunk@516 2bbb7eff-a529-9590-31e7-b0007b416f81
* check bounder before lockPixels on the bitmapGravatar reed@android.com2010-02-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@493 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added a virtual to SkBounder, called by text, that passesGravatar reed@android.com2010-01-04
| | | | | | | | | | the glyph's ID as well as its bounds. Made the universal doIRect() non-abstract so that a child class can override either the general flavor or the text flavor. git-svn-id: http://skia.googlecode.com/svn/trunk@468 2bbb7eff-a529-9590-31e7-b0007b416f81
* outset the bounds if we're in hairline before quick-reject in SkDraw.cppGravatar reed@android.com2009-11-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@445 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't magically convert to hairline unless we're < 1.0 in both X and Y. The ↵Gravatar reed@android.com2009-09-03
| | | | | | | | | | new routine both checks, and if legal, returns the new width which will be used to compute a modulated alpha. git-svn-id: http://skia.googlecode.com/svn/trunk@352 2bbb7eff-a529-9590-31e7-b0007b416f81
* handle cap==round for drawPointsGravatar reed@android.com2009-07-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@266 2bbb7eff-a529-9590-31e7-b0007b416f81
* add dox for scalarcomparetypeGravatar reed@android.com2009-07-08
| | | | | | | | | use internal mutable version of drawPath when we've cons'd up a path on behalf of a rect git-svn-id: http://skia.googlecode.com/svn/trunk@258 2bbb7eff-a529-9590-31e7-b0007b416f81
* use sk_bzero instead of bzero, since it isn't always available.Gravatar reed@android.com2009-06-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@244 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
* remove deprecated use of porterduff enumGravatar reed@android.com2009-06-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@235 2bbb7eff-a529-9590-31e7-b0007b416f81