aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* make imagecache's Key more general purposeGravatar reed2014-08-20
| | | | | | | | | | | This should allow other clients with different sized keys to still use the cache. BUG=skia: R=fmalita@google.com, mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/472343002
* Directly compute glyphToUnicode array in DirectWrite.Gravatar bungeman2014-08-20
| | | | | | | | | | | | | | | This new code is still rather bad, but has fewer steps. The motivation for looking at this is that on Windows 8 the previous code was occasionally asserting in such a way as to imply that GetGlyphIndices might return different data the second time through the font. This avoids that particular issue by only going through the font once. R=mtklein@google.com, halcanary@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/472333003
* Dump out more information if this assert fails.Gravatar mtklein2014-08-20
| | | | | | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/ec924b9696277df4c684e73315194482e1d43e50 R=caryclark@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/491903002
* Dump out more information if this assert fails.Gravatar mtklein2014-08-20
| | | | | | | | | BUG=skia: R=caryclark@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/491903002
* copy points in array that may stretchGravatar caryclark2014-08-20
| | | | | | | | | | | | | | | | | | Description: Potential SkOpSegment::addT() use-after-free The 'pt' arg can be a reference to a point stored in the local fTs TDArray => appending may cause a realloc and leave the reference pointing to deallocated mem. Copy the points from the stretchy array before adding them. R=fmalita@google.com, fmalita@chromium.org, fmalita BUG=405417 Author: caryclark@google.com Review URL: https://codereview.chromium.org/489853002
* Implement SkPicture::hasText() for SkRecord backend.Gravatar mtklein2014-08-20
| | | | | | | | | | | | Plus, some small tweaks to the existing code surrounding it. Just proposals, will undo whatever you don't like. BUG=skia: R=mtklein@google.com, tomhudson@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/494683003
* Remove SK_FONT_HOST_DOES_NOT_USE_FONTMGR and guarded code.Gravatar bungeman2014-08-20
| | | | | | | | | | This define is no longer needed or set, so remove it from the code. R=tomhudson@google.com, djsollen@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/488083004
* Revert to old autohinting behavior on Android.Gravatar djsollen2014-08-20
| | | | | | | | | | | | | | | This CL reverts to the NO_AUTOHINT behavior when autohinting is not explicitly requested. This should be removed when Skia supports a better API for selecting the correct variation. This CL has landed in the Android repo and is being upstreamed to avoid fragmenting the codebase. R=bungeman@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/490913003
* Move the code over using the same template type approach previously used for ↵Gravatar tomhudson2014-08-20
| | | | | | | | | | | | | | | willPlayBackBitmaps in http://skbug.com/2702. Also unifies that flag and this one into a struct so they and others can be computed together. The struct is stored const to enforce lifetime expectations. Adds a few new cases to the unit test. BUG=skia:2700 R=mtklein@google.com, reed@google.com, robertphillips@google.com, tomhudson@google.com Committed: https://skia.googlesource.com/skia/+/60c2a79cfa8ceebcbafc243407564dc71f5e3b4f Author: tomhudson@chromium.org Review URL: https://codereview.chromium.org/364823009
* fix #if to #ifdef for SK_DEBUGGravatar caryclark2014-08-20
| | | | | | | | | | | | | | fix the chrome build R=mtklein@google.com TBR=mtklein NOTREECHECKS=true NOTRY=true BUG=skia: Author: caryclark@google.com Review URL: https://codereview.chromium.org/495453003
* Simplify GrGLPathRendering interfaceGravatar kkinnunen2014-08-20
| | | | | | | | | | | | | | | | | | | | | | | Simplify GrGLPathRendering interface by removing polymorphism and functions that simply wrap GL functions unnecessarily. Replace the polymorphism by if -condition. Call the unconditional GL functions directly. GrGLPath, GrGLPathRange and GrGLPathRendering are part of the same logical subsystem. This means that the subsystem implementation details are taken into account within these classes. Example: if support for using conics would be added, the feature flag would go to GrGLPathRendering::Caps, the emulation would go to GrGLPath instead of GrGLPathRendering::pathCommands. Wrapping glPathCommandsNV is not useful. Try to expose the interface fully in same logical level; rename fragment input function to reflect this. R=bsalomon@google.com, cdalton@nvidia.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/450283002
* Separate GL path rendering state from GrGpuGL to GrGLPathRenderingGravatar kkinnunen2014-08-20
| | | | | | | | | | | | | | | | | | | Separate GL path rendering state from GrGpuGL to GrGLPathRendering. This makes GrGpuGL code simpler. The intention is that while GrGpuGL represents the global environment for GL, the GrGLPathRendering represents the global environment for path rendering extension. Add GrPathRendering, a base class for path rendering, and inherit GrGLPathRendering from that. Move the path rendering virtual functions from GrGpu to GrPathRendering. R=bsalomon@google.com, cdalton@nvidia.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/452823002
* Make GrGLConfigConversionEffect work for Imagination and some other GPUs.Gravatar changjun.yang2014-08-19
| | | | | | | | | | | | BUG=372341 Committed: https://skia.googlesource.com/skia/+/93cf46f7d687128d2ad05762bd65fea6c4539553 R=bsalomon@google.com, tomhudson@chromium.org Author: changjun.yang@intel.com Review URL: https://codereview.chromium.org/277323002
* Cheat to go fast, but be careful in debug mode.Gravatar mtklein2014-08-19
| | | | | | | | | | | | Turns out recording actual text metrics is currently really slow. If we want to compete with the (cheating) status quo, gotta cheat too. BUG=skia: R=reed@google.com, robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/494483002
* Add the method isOpaque() to SkImageGravatar piotaixr2014-08-19
| | | | | | | | | BUG=skia:2766 R=junov@chromium.org, halcanary@google.com, scroggo@google.com, reed@google.com, bsalomon@google.com Author: piotaixr@chromium.org Review URL: https://codereview.chromium.org/406673003
* Revert of Add GrResourceCache2. (patchset #4 of ↵Gravatar bsalomon2014-08-19
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/481443002/) Reason for revert: Likely caused a leak detected in Chromium after last Skia roll. Original issue's description: > Add GrResourceCache2. > > Currently it just replaces GrGpu as the owner of the linked list of resources. > > Committed: https://skia.googlesource.com/skia/+/94ce9ac8624dbb45656b8f5c992fad9c9ff3ee5f R=mtklein@google.com, robertphillips@google.com TBR=mtklein@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: bsalomon@google.com Review URL: https://codereview.chromium.org/477323006
* Add GrResourceCache2.Gravatar bsalomon2014-08-19
| | | | | | | | | | Currently it just replaces GrGpu as the owner of the linked list of resources. R=robertphillips@google.com, mtklein@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/481443002
* remove unused SkIntToFloatCast_NoOverflowCheckGravatar caryclark2014-08-19
| | | | | | | | | R=reed@google.com, reed BUG=skia:2849 Author: caryclark@google.com Review URL: https://codereview.chromium.org/483273003
* Record concat as setMatrix.Gravatar mtklein2014-08-19
| | | | | | | | | | | | | Mainly this cuts out a type to have to think about in SkRecord world. It also means all the CTMs are recorded directly in the SkRecord, so we can track the current CTM by pointer rather than by copying. BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/484673003
* Quickfix for incorrect PICTURE_MATRIX_PAINT & PATCH optimization.Gravatar fmalita2014-08-19
| | | | | | | | | | DRAW_PICTURE_MATRIX_PAINT & DRAW_PATCH are drawing ops. R=reed@google.com, robertphillips@google.com, mtklein@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/480463004
* Move SkReadBuffer.h and SkReader32.h out of include.Gravatar halcanary2014-08-19
| | | | | | | | | | Committed: https://skia.googlesource.com/skia/+/2a51d7c74cec217195f861677de8998b382b39e4 R=mtklein@google.com, reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/481053002
* Revert "Move the code over using the same template type approach previously ↵Gravatar Mike Klein2014-08-18
| | | | | | | | | | used for willPlayBackBitmaps in http://skbug.com/2702." This reverts commit 60c2a79cfa8ceebcbafc243407564dc71f5e3b4f. BUG=skia: Review URL: https://codereview.chromium.org/481173003
* Move the code over using the same template type approach previously used for ↵Gravatar tomhudson2014-08-18
| | | | | | | | | | | | | willPlayBackBitmaps in http://skbug.com/2702. Also unifies that flag and this one into a struct so they and others can be computed together. The struct is stored const to enforce lifetime expectations. Adds a few new cases to the unit test. BUG=skia:2700 R=mtklein@google.com, reed@google.com, robertphillips@google.com, tomhudson@google.com Author: tomhudson@chromium.org Review URL: https://codereview.chromium.org/364823009
* Revert "Move SkReadBuffer.h and SkReader32.h out of include."Gravatar halcanary2014-08-18
| | | | | | | | | | | | | | This reverts commit 2a51d7c74cec217195f861677de8998b382b39e4. Breaking Blink NOTRY=true R=bungeman@google.com TBR=bungeman@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/472303006
* Counterproposal for skirting the BBH when the query fully contains the picture.Gravatar mtklein2014-08-18
| | | | | | | | | BUG=skia: R=reed@google.com, robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/485703002
* Move SkReadBuffer.h and SkReader32.h out of include.Gravatar halcanary2014-08-18
| | | | | | | | R=mtklein@google.com, reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/481053002
* Expose API for whether an SkPicture contains textGravatar ajuma2014-08-18
| | | | | | | | | BUG=chromium:399728 R=reed@google.com, nduca@chromium.org Author: ajuma@chromium.org Review URL: https://codereview.chromium.org/478673002
* Fix srcAlpaWillBeOne() for coverage drawingGravatar bsalomon2014-08-18
| | | | | | | | R=egdaniel@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/480113002
* Start actually bounding some draw ops.Gravatar mtklein2014-08-18
| | | | | | | | | | | This covers most of the common draws. BUG=skia: R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/469213007
* Fix copyright on SkTLS.h.Gravatar bungeman2014-08-18
| | | | | | | | R=reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/481783002
* Rename GPUAccelData to GrAccelDataGravatar robertphillips2014-08-18
| | | | | | | | | | | This is calved off of (Add new API to allow layer hoisting/atlasing across picture piles - https://codereview.chromium.org/474623002/) R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/482773002
* Refactor GrLayerCache for new APIGravatar robertphillips2014-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only substantive change in this CL is skipping atlasing for any layers that are involved in nesting. Prior versions have allowed nesting layers to be atlased. -------------------------------------------------------- All times are on Windows with a repeat count of 200. Format is: <time in ms> (<# of glBindframebuffer calls>) How to interpret this: For the boogie page: both columns should be the same (since boogie has no nested layers) without the new API the tiled case doesn't show any real benefit from hoisting For the carsvg page: The nesting change does increase the number of FBO switches but doesn't kill performance Because of the location & size of the layers the tile case does show some improvement (even without the new API) boogie ------- w/o nested change w/ nested change simple 5.62 (811) N/A tiled 7.72 (811) N/A simple w/ hoisting 5.23 (409) 5.77 (409) (but no caching) tiled w/ hoisting 7.57 (809) 7.49 (809) (but no caching) carsvg ------ w/o nested change w/ nested change simple 60.37 (141990) N/A tiled 115.13 (256929) N/A simple w/ hoisting 41.57 (64570) 42.82 (72279) (but no caching) tiled w/ hoisting 84.24 (154352) 84.71 (165630) (but no caching) R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/476833004
* Small tweaks and a bug fix.Gravatar mtklein2014-08-18
| | | | | | | | | | | | | | | | | Bug fixed: I was calling paint->canComputeFastBounds() where I should have been calling fSaveStack[i].paint->canComputeFastBounds(). This suggested I factor out the paint adjusting code, now called AdjustForPaint(). This removes the getImageFilter() check for SaveLayers, which seems like an optimization we can add back later if it proves important. We're going to want to intersect the bounds with the current clip bounds eventually, so might as well land that here too. Plus, more const. BUG=skia: R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/481543002
* SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.Gravatar halcanary2014-08-18
| | | | | | | | R=reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/465823003
* Stop sorting the results of SkBBH::search().Gravatar mtklein2014-08-18
| | | | | | | | | | | | | We only seem to need to sort with SkQuadTree, which is not actively used by client code. So it's really just wasted work. SkQuadTree is interesting, but I'd rather disable it than slow down the production code path. BUG=skia:2834 R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/471063004
* eliminate code related to SkBitmap::ConfigGravatar reed2014-08-18
| | | | | | | | | BUG=skia: R=reed@google.com, mike@reedtribe.org Author: reed@chromium.org Review URL: https://codereview.chromium.org/483593002
* Add alias mapping for Noto Sans CJK for ja/hansGravatar jshin2014-08-18
| | | | | | | | | | | | | | | | | Chrome/Chromium OS are getting a brand new CJK fonts (Noto Sans CJK). We want them to be used in place of common Japanese and Simplified Chinese sans-serif fonts. BUG=chromium:399080 TEST=With CrOS CL (https://chromium-review.googlesource.com/#/c/212624/), web pages using 'Simhei' and 'MSP Gothic' are rendered with Noto Sans CJK. R=reed@chromium.org, bungeman@google.com Author: jshin@chromium.org Review URL: https://codereview.chromium.org/476203003
* Correct order for alignment in name iterator record.Gravatar bungeman2014-08-18
| | | | | | | | | | | | | | | We must be quite careful about the order of fields in a 'pragma pack(1)'. On Android the order 'uint16_t, void*' will misalign the pointer, potentially leading to a crash. In the future we should move anything which is not strictly part of the table definition outside of the packed region. R=mtklein@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/474313002
* simplify SkCanvas::init()Gravatar reed2014-08-18
| | | | | | | | | BUG=skia: R=robertphillips@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/472123002
* Fix typoGravatar krajcevski2014-08-18
| | | | | | | | R=robertphillips@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/478533002
* Remove fOrigFontID from SkScalerContextRec.Gravatar bungeman2014-08-18
| | | | | | | | | | With the recent Android changes and removal of chaining, this is no longer used. R=djsollen@google.com, reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/476713003
* Remove unused SkGlyphCache::VisitAllCaches.Gravatar bungeman2014-08-18
| | | | | | | | R=reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/472153002
* Added bench for grid of patches.Gravatar dandov2014-08-15
| | | | | | | | | | | | It is on top of my previous cl to fix the mem leaks of the regular patch bench. NOTREECHECKS=true BUG=skia: R=egdaniel@google.com, bsalomon@google.com Author: dandov@google.com Review URL: https://codereview.chromium.org/470543004
* SkRecordDraw: incorporate clip into BBHGravatar mtklein2014-08-15
| | | | | | | | | | | NOTREECHECKS=true BUG=skia: R=robertphillips@google.com, senorblanco@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/474983002
* Check all scratch texture allocations for image filters.Gravatar senorblanco2014-08-15
| | | | | | | | | | BUG=403677 R=bsalomon@google.com NOTREECHECKS=true Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/473283002
* Fixed memory leak for nanobench and crashing in SampleAppGravatar dandov2014-08-15
| | | | | | | | | | | NOTREECHECKS=True BUG=skia:2830 R=mtklein@google.com, egdaniel@google.com Author: dandov@google.com Review URL: https://codereview.chromium.org/469333002
* int SkPicture::approximateOpCount()Gravatar mtklein2014-08-14
| | | | | | | | | | | NOTREECHECKS=true BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/470333002
* Make null gpu context threadsafe(r) and make sure buffer objects are destroyed.Gravatar bsalomon2014-08-14
| | | | | | | | | NOTREECHECKS=true R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/470993002
* Remove SkPaintOptionsAndroidGravatar djsollen2014-08-14
| | | | | | | | | | Committed: https://skia.googlesource.com/skia/+/f32331ffdb5de0440bb337aa7cbdd6f33e9ff23b R=reed@google.com, mtklein@google.com, tomhudson@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/447873003
* Revert of Remove SkPaintOptionsAndroid (patchset #5 of ↵Gravatar bsalomon2014-08-13
| | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/447873003/) Reason for revert: Breaks the Chromium build: http://108.170.220.120:10117/builders/Canary-Chrome-Ubuntu13.10-Ninja-x86_64-DRT/builds/2469/steps/BuildContentShell_1/logs/stdio Original issue's description: > Remove SkPaintOptionsAndroid > > Committed: https://skia.googlesource.com/skia/+/f32331ffdb5de0440bb337aa7cbdd6f33e9ff23b R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com TBR=djsollen@google.com, mtklein@google.com, reed@google.com, tomhudson@google.com NOTREECHECKS=true NOTRY=true Author: bsalomon@google.com Review URL: https://codereview.chromium.org/473543004