aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
Commit message (Collapse)AuthorAge
* Punctuation cleanup to satisfy idiosyncracies of OpenBSD gcc 4.2.1.Gravatar tomhudson@google.com2012-06-01
| | | | | | | | | | Original patch by landry.breuil. http://code.google.com/p/skia/issues/detail?id=626 git-svn-id: http://skia.googlecode.com/svn/trunk@4112 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update the implementation of SkTypeface_android.h functions.Gravatar djsollen@google.com2012-06-01
| | | | | | | | | | | This CL removes the hardcoded mappings of FallbackScripts to a particular font file and replaces it with a dynamic mechanism that takes a style and representative character code for a given FallbackScript class and returns the most appropriate SkTypeface that contains that character code. Review URL: https://codereview.appspot.com/6197074 git-svn-id: http://skia.googlecode.com/svn/trunk@4111 2bbb7eff-a529-9590-31e7-b0007b416f81
* Zero out GrSamplerState in constructor to recover performance loss on Linux ↵Gravatar tomhudson@google.com2012-05-31
| | | | | | | | | | | from r4102. (Noise in padding bytes was breaking operator==()) Visual review by bsalomon@. git-svn-id: http://skia.googlecode.com/svn/trunk@4108 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkFontDescriptor for serializing fonts.Gravatar djsollen@google.com2012-05-31
| | | | | | Review URL: https://codereview.appspot.com/6250080 git-svn-id: http://skia.googlecode.com/svn/trunk@4106 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement morphology as a custom effectGravatar bsalomon@google.com2012-05-31
| | | | | | | | Review URL: http://codereview.appspot.com/6250073/ git-svn-id: http://skia.googlecode.com/svn/trunk@4102 2bbb7eff-a529-9590-31e7-b0007b416f81
* We often rgn-diff an area >= the other rgn. now we detect that and return emptyGravatar reed@google.com2012-05-31
| | | | | | | We do this when we update our devices in SkCanvas.cpp Review URL: https://codereview.appspot.com/6249073 git-svn-id: http://skia.googlecode.com/svn/trunk@4101 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add glTexParameteriv to GL interfaceGravatar bsalomon@google.com2012-05-31
| | | | | | | | | | Comitted on behalf of jin.a.yang@intel.com Review URL: http://codereview.appspot.com/6213069/ git-svn-id: http://skia.googlecode.com/svn/trunk@4099 2bbb7eff-a529-9590-31e7-b0007b416f81
* Windows compiler complaint cleanupGravatar robertphillips@google.com2012-05-31
| | | | | | | | http://codereview.appspot.com/6262047/ git-svn-id: http://skia.googlecode.com/svn/trunk@4098 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix typo in r4092.Gravatar tomhudson@google.com2012-05-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4094 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use element-by-element assignment in GrSamplerState::operator= instead of memcpyGravatar tomhudson@google.com2012-05-31
| | | | | | | | | | so that we can handle refcounting correctly. http://codereview.appspot.com/6262049/ git-svn-id: http://skia.googlecode.com/svn/trunk@4092 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor dictionaries for use by entities other than just SkPictureGravatar djsollen@google.com2012-05-30
| | | | | | Review URL: https://codereview.appspot.com/6101043 git-svn-id: http://skia.googlecode.com/svn/trunk@4077 2bbb7eff-a529-9590-31e7-b0007b416f81
* arm: First step towards dynamic NEON support.Gravatar digit@google.com2012-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds minimal support for dynamic ARM NEON support, i.e. the ability to probe the CPU at runtime for NEON and provide alternate code paths when it is available. - Add include/core/SkUtilsArm.h, which declares a few helper macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy function 'sk_cpu_arm_has_neon()' which returns true if the target CPU supports the ARM NEON instruction set. Note that the header is in include/core/ because it will have to be included from NEON-specific code under src/code/ It would probably be more logical to put it under include/opts/ instead, but this would require moving all the NEON-specific stuff under src/code/ into src/opts/, which is not trivial due to the way the code is currently architected. - Add src/core/SkUtilsArm.cpp which implements 'sk_cpu_arm_has_neon' for ARM-based Linux systems, only when SK_NEON_ARM_IS_DYNAMIC is true. (For other cases, 'sk_cpu_arm_has_neon' is an inline function that returns a constant 'true' or 'false' value). There is no user-level accessible CPUID instruction on ARM, so do all CPU feature probing by parsing /proc/cpuinfo. This is Linux-specific. For Debug build types, the CPU probing result is printed to the Android log (or Linux command-line) for easier debugging. - Create a new 'opts_neon' target (static library) which shall contain all the NEON-specific code paths for the library. This is necessary because -mfpu=neon impacts also non-scalar code. Just like with -mssse3 on x86, we can't build the rest of the library with this flag. Note that for now, we only include memset16_neon and memset32_neon in this library. - Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC properly. Compared to a 'xoom' build, the only difference is the use of NEON-optimized memset16/32 functions. Later patches will move more NEON-specific code paths to 'opts_neon'. Review URL: https://codereview.appspot.com/6247058 git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
* addPoly() entry-point, to quickly add MoveTo+N*LineTo (useful in dashing)Gravatar reed@google.com2012-05-29
| | | | | | Review URL: https://codereview.appspot.com/6256063 git-svn-id: http://skia.googlecode.com/svn/trunk@4061 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix line ending, mark svn:eol-style LFGravatar bsalomon@google.com2012-05-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4060 2bbb7eff-a529-9590-31e7-b0007b416f81
* Detect when the caller was hairline AND strokeandfill, and resolve that into ↵Gravatar reed@google.com2012-05-29
| | | | | | | | | FILL This fixes the unittests on WIN in the trybot for DEPS roll 4048 Review URL: https://codereview.appspot.com/6242057 git-svn-id: http://skia.googlecode.com/svn/trunk@4057 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPoint::isZero(), match the existing method on SkIPointGravatar mike@reedtribe.org2012-05-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4055 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rolling back 4053Gravatar robertphillips@google.com2012-05-28
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4054 2bbb7eff-a529-9590-31e7-b0007b416f81
* Speculative fix for Android Debug only crash in r4049Gravatar robertphillips@google.com2012-05-28
| | | | | | | | http://codereview.appspot.com/6251049/ git-svn-id: http://skia.googlecode.com/svn/trunk@4053 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rolling back r4049Gravatar robertphillips@google.com2012-05-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4051 2bbb7eff-a529-9590-31e7-b0007b416f81
* Altered GrDrawState to always ref textures and render targetGravatar robertphillips@google.com2012-05-25
| | | | | | | | http://codereview.appspot.com/6251049/ git-svn-id: http://skia.googlecode.com/svn/trunk@4049 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change patheffect to take a (new) StrokeRec object, which encapsulates the fillGravatar reed@google.com2012-05-25
| | | | | | | | | | | | | | | | | | | or stroke parameters for a path. Today, the patheffect only sees if the caller was going to stroke or fill, and if stroke, it just sees the width. With this change, the effect can see all of the related parameters (e.g. cap/join/miter). No other change is intended at this time. After this change, I hope to use this additional data to allow SkDashPathEffect to, at times, apply the stroke as part of its effect, which may be much more efficient than first dashing, and then reading that and stroking it. Most of these files changed just because of the new parameter to filterPath. The key changes are in SkPathEffect.[h,cpp], SkPaint.cpp and SkScalerContext.cpp Review URL: https://codereview.appspot.com/6250051 git-svn-id: http://skia.googlecode.com/svn/trunk@4048 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 4046 -- GM:pathfill failed on one bot, maybe uninitialized memory ↵Gravatar reed@google.com2012-05-24
| | | | | | somewhere? git-svn-id: http://skia.googlecode.com/svn/trunk@4047 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change patheffect to take a (new) StrokeRec object, which encapsulates the fillGravatar reed@google.com2012-05-24
| | | | | | | | | | | | | | | | | | | or stroke parameters for a path. Today, the patheffect only sees if the caller was going to stroke or fill, and if stroke, it just sees the width. With this change, the effect can see all of the related parameters (e.g. cap/join/miter). No other change is intended at this time. After this change, I hope to use this additional data to allow SkDashPathEffect to, at times, apply the stroke as part of its effect, which may be much more efficient than first dashing, and then reading that and stroking it. Most of these files changed just because of the new parameter to filterPath. The key changes are in SkPathEffect.[h,cpp], SkPaint.cpp and SkScalerContext.cpp Review URL: https://codereview.appspot.com/6249050 git-svn-id: http://skia.googlecode.com/svn/trunk@4046 2bbb7eff-a529-9590-31e7-b0007b416f81
* Removed SoftwarePathRenderer from GrContext's path renderer chainGravatar robertphillips@google.com2012-05-23
| | | | | | | | http://codereview.appspot.com/6221065/ git-svn-id: http://skia.googlecode.com/svn/trunk@4036 2bbb7eff-a529-9590-31e7-b0007b416f81
* Plumbing to propagate save & restore from SkCanvas down to GrContext & lowerGravatar robertphillips@google.com2012-05-23
| | | | | | | | http://codereview.appspot.com/6203067/ git-svn-id: http://skia.googlecode.com/svn/trunk@4034 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove GrClipMaskManager's path renderer chain (in favor of GrContext's)Gravatar robertphillips@google.com2012-05-22
| | | | | | | | http://codereview.appspot.com/6211078/ git-svn-id: http://skia.googlecode.com/svn/trunk@4032 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename GrProgramStageFactory::stageKey to GrProgramStageFactory::glStageKey ↵Gravatar bsalomon@google.com2012-05-21
| | | | | | | | | | since it is GL-specific Review URL: http://codereview.appspot.com/6218060/ git-svn-id: http://skia.googlecode.com/svn/trunk@4020 2bbb7eff-a529-9590-31e7-b0007b416f81
* Tunnel name requests through factory, forcing custom effect and custom prog ↵Gravatar bsalomon@google.com2012-05-21
| | | | | | | | | | stage to use same impl Review URL: http://codereview.appspot.com/6220061/ git-svn-id: http://skia.googlecode.com/svn/trunk@4019 2bbb7eff-a529-9590-31e7-b0007b416f81
* update dox for NewFromMalloc() to clarify ownershipGravatar reed@google.com2012-05-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4017 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make static const var that is only used in an assert be defined in the debug ↵Gravatar bsalomon@google.com2012-05-21
| | | | | | build only to suppress an unused var warning. git-svn-id: http://skia.googlecode.com/svn/trunk@4012 2bbb7eff-a529-9590-31e7-b0007b416f81
* Stop using GrDrawState to track GPU's blend stateGravatar bsalomon@google.com2012-05-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4007 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix build?Gravatar bsalomon@google.com2012-05-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4004 2bbb7eff-a529-9590-31e7-b0007b416f81
* Some refactoring of GrCustomStage and friendsGravatar bsalomon@google.com2012-05-18
| | | | | | | | Review URL: http://codereview.appspot.com/6209071/ git-svn-id: http://skia.googlecode.com/svn/trunk@4003 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix type errors and a few warnings for Visual Studio 2010 64-bit build.Gravatar tomhudson@google.com2012-05-17
| | | | | | | | | | | | We're still far from 64b statically safe, mostly around SkReader32.h and the address-alignment code in GrTypes.h. Original code provided by jianliang79. http://code.google.com/p/skia/issues/detail?id=601 git-svn-id: http://skia.googlecode.com/svn/trunk@3994 2bbb7eff-a529-9590-31e7-b0007b416f81
* change SkChunkAlloc to grow its allocations geometrically (not linearly)Gravatar reed@google.com2012-05-17
| | | | | | | | plus add a bench and unittest for it. git-svn-id: http://skia.googlecode.com/svn/trunk@3989 2bbb7eff-a529-9590-31e7-b0007b416f81
* change SetTLSFontCacheLimit to be void, since it doesn't easily know the ↵Gravatar reed@google.com2012-05-17
| | | | | | prev value git-svn-id: http://skia.googlecode.com/svn/trunk@3987 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow font-cache to use thread_local_storage for a private cacheGravatar reed@google.com2012-05-17
| | | | | | Review URL: https://codereview.appspot.com/6200051 git-svn-id: http://skia.googlecode.com/svn/trunk@3986 2bbb7eff-a529-9590-31e7-b0007b416f81
* Mutexes in pixelrefs were done very sloppily initially. The code (a) assumes allGravatar reed@google.com2012-05-17
| | | | | | | | | | | | | | | | | | | | pixelref subclasses want a mutex to guard their lock/unlock virtuals, and (b) most subclasses use the same mutex for *all* of their instances, even when there is no explicit need to guard modifying one instances with another. When we try drawing bitmaps from multiple threads, we are seeing a lot of slow- down from these mutexes. This CL has two changes to try to speed things up. 1. Add setPreLocked(), for pixelrefs who never need the onLockPixels virtual to be called. This speeds up those subclasses in multithreaded environs as it avoids the mutex lock all together (e.g. SkMallocPixelRef). 2. Add setMutex() to allow a subclass to change the mutex choice. ashmem wants this, since its unflattening constructor cannot pass down the null, it needs to cleanup afterwards. Review URL: https://codereview.appspot.com/6199075 git-svn-id: http://skia.googlecode.com/svn/trunk@3985 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add 'inline' to suppress unused warnings with Android NDK build.Gravatar bungeman@google.com2012-05-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3982 2bbb7eff-a529-9590-31e7-b0007b416f81
* computeFastStrokeBounds needs to pass kStroke_Style instead of kFill_Style ↵Gravatar reed@google.com2012-05-16
| | | | | | (ya think?) git-svn-id: http://skia.googlecode.com/svn/trunk@3981 2bbb7eff-a529-9590-31e7-b0007b416f81
* pass the region-op to the clipstack for SkCanvas::clipRegion.Gravatar reed@google.com2012-05-16
| | | | | | | | we were defaulting to intersect all the time (doh). git-svn-id: http://skia.googlecode.com/svn/trunk@3980 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix new atomic declarations for Android.Gravatar bungeman@google.com2012-05-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3979 2bbb7eff-a529-9590-31e7-b0007b416f81
* WeakRefCntGravatar bungeman@google.com2012-05-16
| | | | | | | http://codereview.appspot.com/5649046/ git-svn-id: http://skia.googlecode.com/svn/trunk@3978 2bbb7eff-a529-9590-31e7-b0007b416f81
* Iter::next takes a bool (defaults to true for now) if we want to consume ↵Gravatar reed@google.com2012-05-16
| | | | | | | | | | degenerates. path-filling and stroking pass false, as they already are written to handle small segments (and it makes next() run 2x faster if you pass false). Review URL: https://codereview.appspot.com/6214049 git-svn-id: http://skia.googlecode.com/svn/trunk@3974 2bbb7eff-a529-9590-31e7-b0007b416f81
* can't make the compute-bounds methods private yet :(Gravatar reed@google.com2012-05-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3969 2bbb7eff-a529-9590-31e7-b0007b416f81
* perform quickReject in drawPoints (which is called by drawLine) just like weGravatar reed@google.com2012-05-16
| | | | | | | | already did in drawRect and drawPath git-svn-id: http://skia.googlecode.com/svn/trunk@3968 2bbb7eff-a529-9590-31e7-b0007b416f81
* speedup SkRect::isFinite() (almost 2x)Gravatar reed@google.com2012-05-16
| | | | | | | | add SkRect:set(p0, p1) for quick bounds of 2 points git-svn-id: http://skia.googlecode.com/svn/trunk@3967 2bbb7eff-a529-9590-31e7-b0007b416f81
* update dox for copy-constructorGravatar reed@google.com2012-05-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3966 2bbb7eff-a529-9590-31e7-b0007b416f81
* add computeFastBounds to SkPathEffect, so we can attempt quickRejectGravatar reed@google.com2012-05-15
| | | | | | Review URL: https://codereview.appspot.com/6209070 git-svn-id: http://skia.googlecode.com/svn/trunk@3964 2bbb7eff-a529-9590-31e7-b0007b416f81
* update dox for measureTextGravatar reed@google.com2012-05-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3960 2bbb7eff-a529-9590-31e7-b0007b416f81