aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
Commit message (Collapse)AuthorAge
* Fix SkMatrix line endings (LF)Gravatar bsalomon@google.com2012-07-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4592 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup restore offsets at end of SkPicture recordingGravatar junov@chromium.org2012-07-12
| | | | | | | | | | Review URL: http://codereview.appspot.com/6355099/ TEST=skia unit test CanvasTest, test step TwoClipOps BUG=https://code.google.com/p/chromium/issues/detail?id=133432 git-svn-id: http://skia.googlecode.com/svn/trunk@4577 2bbb7eff-a529-9590-31e7-b0007b416f81
* Introduces new SingleTextureEffect base class for GrCustomStage objects.Gravatar tomhudson@google.com2012-07-12
| | | | | | | | | | | | | | This class tracks the texture that the object uses. A future commit will get rid of the GrTexture pointer currenty stored in the GrDrawState, allowing us to have CustomStages *without* textures. Requires gyp change on next roll. http://codereview.appspot.com/6306097/ git-svn-id: http://skia.googlecode.com/svn/trunk@4576 2bbb7eff-a529-9590-31e7-b0007b416f81
* check a hashtable before using a bsearchGravatar reed@google.com2012-07-12
| | | | | | Review URL: https://codereview.appspot.com/6345097 git-svn-id: http://skia.googlecode.com/svn/trunk@4572 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing type mask computation in SkMatrix to make it faster and make it so ↵Gravatar junov@chromium.org2012-07-12
| | | | | | | | | | | | | that matrices have the same type masks as their inverses. This patch also add bench tests that call invert() followed by mapRect() on various types of matrices. Performance of these tests was greatly affected by typemask computation Review URL: http://codereview.appspot.com/6380043/ BUG=https://code.google.com/p/chromium/issues/detail?id=135259 git-svn-id: http://skia.googlecode.com/svn/trunk@4562 2bbb7eff-a529-9590-31e7-b0007b416f81
* idea: add annotation to SkPaintGravatar reed@google.com2012-07-11
| | | | | | Review URL: https://codereview.appspot.com/6355050 git-svn-id: http://skia.googlecode.com/svn/trunk@4555 2bbb7eff-a529-9590-31e7-b0007b416f81
* add default: to switch statement, to avoid warning/error for unhandled cases.Gravatar reed@google.com2012-07-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4552 2bbb7eff-a529-9590-31e7-b0007b416f81
* add flatten/unflatten to SkDataSetGravatar reed@google.com2012-07-11
| | | | | | Review URL: https://codereview.appspot.com/6374057 git-svn-id: http://skia.googlecode.com/svn/trunk@4548 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkDataSet class, so SkAnnotation can be more immutable-likeGravatar reed@google.com2012-07-11
| | | | | | Review URL: https://codereview.appspot.com/6354091 git-svn-id: http://skia.googlecode.com/svn/trunk@4542 2bbb7eff-a529-9590-31e7-b0007b416f81
* This patch implements the diffuse and specular lighting filters in Ganesh. Gravatar senorblanco@chromium.org2012-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | There are three light types for each: distant, point and spot, whose code generation lives in a GrGLLight class hierarchy. This similar to the CPU implementation, where each light type provides a function to compute the vector from the surface plane to the light (surfaceToLight) and to compute the light colour (emitLightColour). Instead of templated member functions, as in the CPU implementation, these are virtual functions to emit the light-specific GLSL code. All of the code for the GPU path lives in the same file as that for the CPU path, SkLightingImageFilter.cpp. In order to provide Ganesh a hook to access it, SkImageFilter now has a asNewCustomStage() virtual, which allows an image filter to return a GrCustomStage representing that filter. Note that this patch does not handle the border conditions correctly (the [top|bottom][Left|Right]Normal() functions in the CPU implementation). That will come in a future patch. Review URL: http://codereview.appspot.com/6345081/ git-svn-id: http://skia.googlecode.com/svn/trunk@4535 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert SkNO_RETURN_HINT fix in favor of a simpler fixGravatar bsalomon@google.com2012-07-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4529 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix SkNO_RETURN_HINT warnings on mac/clangGravatar bsalomon@google.com2012-07-11
| | | | | | | | Review URL: http://codereview.appspot.com/6392048/ git-svn-id: http://skia.googlecode.com/svn/trunk@4528 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPath::contains(x, y)Gravatar mike@reedtribe.org2012-07-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4526 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkFlatData to have a sentinel value, allowing the Compare function toGravatar reed@google.com2012-07-10
| | | | | | | not need a loop-end-test. Review URL: https://codereview.appspot.com/6355086 git-svn-id: http://skia.googlecode.com/svn/trunk@4517 2bbb7eff-a529-9590-31e7-b0007b416f81
* Handle convex paths with degeneracies in cheap direction computationGravatar bsalomon@google.com2012-07-10
| | | | | | | | Review URL: http://codereview.appspot.com/6349085/ git-svn-id: http://skia.googlecode.com/svn/trunk@4515 2bbb7eff-a529-9590-31e7-b0007b416f81
* bug fix: take the fAllocSize into account when we perform the compare, otherwiseGravatar reed@google.com2012-07-10
| | | | | | | | we can read past the end of one of the flatdatas if we're unlucky. git-svn-id: http://skia.googlecode.com/svn/trunk@4503 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding sanity checks on restore offsets in SkPicturePlayback::drawGravatar junov@chromium.org2012-07-09
| | | | | | | | | Review URL: http://codereview.appspot.com/6382044/ BUG=http://code.google.com/p/chromium/issues/detail?id=133432 git-svn-id: http://skia.googlecode.com/svn/trunk@4496 2bbb7eff-a529-9590-31e7-b0007b416f81
* restore 4478 w/ fixed assert (no long need 8-byte alignment)Gravatar reed@google.com2012-07-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4480 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 4478Gravatar reed@google.com2012-07-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4479 2bbb7eff-a529-9590-31e7-b0007b416f81
* switch callers to SkChecksum::Compute (no 32/64 preference)Gravatar reed@google.com2012-07-09
| | | | | | Review URL: https://codereview.appspot.com/6377043 git-svn-id: http://skia.googlecode.com/svn/trunk@4478 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactoring code in SkPictureRecord that touches fRestoreOffsetStackGravatar junov@chromium.org2012-07-09
| | | | | | | | | Review URL: http://codereview.appspot.com/6350059/ BUG=http://code.google.com/p/chromium/issues/detail?id=133432 git-svn-id: http://skia.googlecode.com/svn/trunk@4472 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rolling back r4034 (Proposed plumbing to propagate save & restore)Gravatar robertphillips@google.com2012-07-03
| | | | | | | | http://codereview.appspot.com/6346066/ git-svn-id: http://skia.googlecode.com/svn/trunk@4456 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkTSearch variants with compare func as template paramGravatar bsalomon@google.com2012-07-03
| | | | | | | | Review URL: https://codereview.appspot.com/6345060/ git-svn-id: http://skia.googlecode.com/svn/trunk@4449 2bbb7eff-a529-9590-31e7-b0007b416f81
* change NewWithCString to allocate room for the terminating NULL, so the dataGravatar reed@google.com2012-07-02
| | | | | | | | can be treated as a cstring (duh). git-svn-id: http://skia.googlecode.com/svn/trunk@4430 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix typeGravatar reed@google.com2012-07-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4428 2bbb7eff-a529-9590-31e7-b0007b416f81
* add read/write SkData methodsGravatar reed@google.com2012-07-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4427 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkData::NewFromCString()Gravatar reed@google.com2012-06-28
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4383 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding checksum to SkFlatData to accelerate SkPicture recording.Gravatar junov@chromium.org2012-06-27
| | | | | | | | | | | | The checksum triggers an early exit in the mem compare use to search for duplicate flattened objects. Also, call to memcmp was replaced with 64-bit at a time comparison loop. Review URL: http://codereview.appspot.com/6339046/ BUG=http://code.google.com/p/chromium/issues/detail?id=54079 TEST=Checksum and PictureRecord tests in bench.exe git-svn-id: http://skia.googlecode.com/svn/trunk@4378 2bbb7eff-a529-9590-31e7-b0007b416f81
* Separated Inst counting from the SK_DEBUG #define (now SK_ENABLE_INST_COUNT)Gravatar robertphillips@google.com2012-06-27
| | | | | | | | http://codereview.appspot.com/6353047/ git-svn-id: http://skia.googlecode.com/svn/trunk@4376 2bbb7eff-a529-9590-31e7-b0007b416f81
* add explicit purgeAll() so we don't get foiled by the min cache-limitGravatar reed@google.com2012-06-27
| | | | | | | call unref instead of delete on the GrFontScaler Review URL: https://codereview.appspot.com/6353045 git-svn-id: http://skia.googlecode.com/svn/trunk@4366 2bbb7eff-a529-9590-31e7-b0007b416f81
* Bump max flattenable from 64 to 1024.Gravatar bungeman@google.com2012-06-27
| | | | | | | Ran into limit on Mac. git-svn-id: http://skia.googlecode.com/svn/trunk@4364 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added Inst counting to SkFlattenable-derived classesGravatar robertphillips@google.com2012-06-27
| | | | | | | | http://codereview.appspot.com/6355043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4359 2bbb7eff-a529-9590-31e7-b0007b416f81
* more SkInstCnt plumbingGravatar reed@google.com2012-06-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4344 2bbb7eff-a529-9590-31e7-b0007b416f81
* add more SkInstCnt plumbingGravatar reed@google.com2012-06-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4343 2bbb7eff-a529-9590-31e7-b0007b416f81
* stick SkInstCnt in more classes, to help track down leaksGravatar reed@google.com2012-06-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4341 2bbb7eff-a529-9590-31e7-b0007b416f81
* Register some flattenable factories.Gravatar scroggo@google.com2012-06-25
| | | | | | | | | | | Now, SkComposeShaders, SkDiscreteMapper, SkCosineMapper, Line2DPathEffect, and SkTransparentShader can be flattened and unflattened. This makes more of our samples work when using a pipe. Review URL: https://codereview.appspot.com/6338064 git-svn-id: http://skia.googlecode.com/svn/trunk@4334 2bbb7eff-a529-9590-31e7-b0007b416f81
* if bounds don't intersect in DIFF mode, just return src (don't return empty)Gravatar reed@google.com2012-06-25
| | | | | | Review URL: https://codereview.appspot.com/6337052 git-svn-id: http://skia.googlecode.com/svn/trunk@4331 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix metrics test to no longer include the cpp.Gravatar djsollen@google.com2012-06-25
| | | | | | | | The inclusion of the cpp caused linker errors when building skia components as shared libaries for inclusion in an Android app. Review URL: https://codereview.appspot.com/6338063 git-svn-id: http://skia.googlecode.com/svn/trunk@4323 2bbb7eff-a529-9590-31e7-b0007b416f81
* export flags on the state of the world when a picture was serialized.Gravatar reed@google.com2012-06-25
| | | | | | | e.g. don't read/write functionptrs in that case (sizeof may be different for one) Review URL: https://codereview.appspot.com/6331050 git-svn-id: http://skia.googlecode.com/svn/trunk@4318 2bbb7eff-a529-9590-31e7-b0007b416f81
* Expand header in serialized picturesGravatar reed@google.com2012-06-22
| | | | | | | | Make chunk/tag reading allow for optional and (somewhat) out-of-order chunks. Return empty picture instead of throwing on error Review URL: https://codereview.appspot.com/6329049 git-svn-id: http://skia.googlecode.com/svn/trunk@4308 2bbb7eff-a529-9590-31e7-b0007b416f81
* Removing redundant calls to GEN_ID_INC_EVAL in SkPaint.cppGravatar junov@chromium.org2012-06-22
| | | | | | | | Review URL: http://codereview.appspot.com/6302099/ git-svn-id: http://skia.googlecode.com/svn/trunk@4305 2bbb7eff-a529-9590-31e7-b0007b416f81
* add PictInfo chunk to serialized picturesGravatar reed@google.com2012-06-22
| | | | | | Review URL: https://codereview.appspot.com/6325048 git-svn-id: http://skia.googlecode.com/svn/trunk@4302 2bbb7eff-a529-9590-31e7-b0007b416f81
* Expanded distribution of instance countingGravatar robertphillips@google.com2012-06-21
| | | | | | | | http://codereview.appspot.com/6300114/ git-svn-id: http://skia.googlecode.com/svn/trunk@4291 2bbb7eff-a529-9590-31e7-b0007b416f81
* Record pixel ref's gen ID in pictureGravatar bsalomon@google.com2012-06-21
| | | | | | | | Review URL: http://codereview.appspot.com/6325046/ git-svn-id: http://skia.googlecode.com/svn/trunk@4289 2bbb7eff-a529-9590-31e7-b0007b416f81
* landing mirror of https://codereview.appspot.com/6304098/Gravatar reed@google.com2012-06-20
| | | | | | | | | | by kondapallykalyan fixing compiler warnings in SkAAClip git-svn-id: http://skia.googlecode.com/svn/trunk@4283 2bbb7eff-a529-9590-31e7-b0007b416f81
* landing http://codereview.appspot.com/6306095/ by guanqunGravatar reed@google.com2012-06-19
| | | | | | | | | | | | | fix the following warning for SkColorTable ../src/core/SkColorTable.cpp: In copy constructor ‘SkColorTable::SkColorTable(const SkColorTable&)’: ../src/core/SkColorTable.cpp:30:1: warning: base class ‘class SkFlattenable’ should be explicitly initialized in the copy constructor [-Wextra] git-svn-id: http://skia.googlecode.com/svn/trunk@4280 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix calling (and checking) the decal_ functions when the input is ↵Gravatar reed@google.com2012-06-13
| | | | | | | | | | | | | SkFractionalInt. The bug was to cast to SkFixed from SkFractionalInt, when what we needed to do was shift the fractional guy down to fixed. This bug was only caught on an android device w/o neon, since other configs have assembly for their matrixproc that didn't have this bug. Review URL: https://codereview.appspot.com/6303074 git-svn-id: http://skia.googlecode.com/svn/trunk@4256 2bbb7eff-a529-9590-31e7-b0007b416f81
* Version 2 of the Instance Counting system. This one simplifies the print out ↵Gravatar robertphillips@google.com2012-06-13
| | | | | | | | | | of information. http://codereview.appspot.com/6296069/ git-svn-id: http://skia.googlecode.com/svn/trunk@4255 2bbb7eff-a529-9590-31e7-b0007b416f81
* For SkGPipe, store bitmaps in a common location.Gravatar scroggo@google.com2012-06-13
| | | | | | | | Also make a change to SkBitmap::copyTo() so that we do not crash. Review URL: https://codereview.appspot.com/6296066 git-svn-id: http://skia.googlecode.com/svn/trunk@4249 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix the problem of rendering closePath not properly after a moveTo call inGravatar schenney@chromium.org2012-06-13
| | | | | | | | | | | | | | | | | | | | canvas 2D interface. If there is a polyline, followed by a moveTo and a closePath, both the moveTo and the closePath should be ignored for the purposes of drawing, and the polyline should not be closed (unless force closed is true (for filling, for instance). Tested for path with both valid and degenerate content, when asked to consume degenerates and not, force closed and not. This patch also includes a uni test refactoring to reduce the amount of code to test path iteration and zero length paths. BUG=6297049 TEST=tests/PathTest.cpp, testIter method. Review URL: https://codereview.appspot.com/6300086 git-svn-id: http://skia.googlecode.com/svn/trunk@4247 2bbb7eff-a529-9590-31e7-b0007b416f81