aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental
Commit message (Collapse)AuthorAge
* Clear the canvas before drawing the gears.Gravatar commit-bot@chromium.org2014-01-16
| | | | | | | | | | | BUG=skia: R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/141113002 git-svn-id: http://skia.googlecode.com/svn/trunk@13114 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add handling alpha values in RRGGBBAA formatted styles.Gravatar commit-bot@chromium.org2014-01-13
| | | | | | | | | | | BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/136553006 git-svn-id: http://skia.googlecode.com/svn/trunk@13052 2bbb7eff-a529-9590-31e7-b0007b416f81
* Just use one version of the scripts in both the browser and in SkV8 by using ↵Gravatar commit-bot@chromium.org2014-01-10
| | | | | | | | | | | | | feature detection to determine if we are running in a browser, and if the platform supports the Path() object. Also add oval, console.log, and the snow example code. BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/132413002 git-svn-id: http://skia.googlecode.com/svn/trunk@13031 2bbb7eff-a529-9590-31e7-b0007b416f81
* Small tweaks to be able to build everything target:Gravatar commit-bot@chromium.org2014-01-08
| | | | | | | | | | | | | | | | | - fParsed is unused. - Quiet down a bogus -Wuninitialized warning in QWeakPointer. Tested Clang and GCC on Linux. BUG= R=bungeman@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/128573002 git-svn-id: http://skia.googlecode.com/svn/trunk@12970 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move v8 into third_party.Gravatar commit-bot@chromium.org2014-01-08
| | | | | | | | | | | BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/116693004 git-svn-id: http://skia.googlecode.com/svn/trunk@12954 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add the gears.js demo and all the code changes needed to get it working, ↵Gravatar commit-bot@chromium.org2014-01-07
| | | | | | | | | | | | | including implementing both fill and stroke style. Also add the HTML and JS files to compare with browser performance. BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/122373003 git-svn-id: http://skia.googlecode.com/svn/trunk@12946 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-01-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12936 2bbb7eff-a529-9590-31e7-b0007b416f81
* Turn on GL drawing, allow switching via --gpu flag.Gravatar commit-bot@chromium.org2014-01-06
| | | | | | | | | | | | | This CL comes after https://codereview.chromium.org/121303004/. BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/122453003 git-svn-id: http://skia.googlecode.com/svn/trunk@12923 2bbb7eff-a529-9590-31e7-b0007b416f81
* Renamed JsCanvas to JsContext and moved into it's own file.Gravatar commit-bot@chromium.org2014-01-06
| | | | | | | | | | | | | Fleshed out a lot of the Path interface. BUG= R=robertphillips@google.com, tfarina@chromium.org, reed@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/121303004 git-svn-id: http://skia.googlecode.com/svn/trunk@12913 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow multiple concurrent timers.Gravatar commit-bot@chromium.org2013-12-20
| | | | | | | | | | | BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/118473006 git-svn-id: http://skia.googlecode.com/svn/trunk@12802 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove unused SkFixed and SkFract functionsGravatar reed@google.com2013-12-19
| | | | | | | | | BUG= R=caryclark@google.com Review URL: https://codereview.chromium.org/113873008 git-svn-id: http://skia.googlecode.com/svn/trunk@12767 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a setTimer() function.Gravatar commit-bot@chromium.org2013-12-18
| | | | | | | | | | | | | Seemed simple, but required adding a Global class that contains all the global state (instance and context) for our running V8 instance. Also moved canvas.inval to be just inval() at the global level. BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/103143009 git-svn-id: http://skia.googlecode.com/svn/trunk@12730 2bbb7eff-a529-9590-31e7-b0007b416f81
* add virtual destructor for SkExample to fix build error.Gravatar commit-bot@chromium.org2013-12-17
| | | | | | | | | | | | | The original SkExample have virtual function draw(), but have no virtual destructor. This may lead to memory leak when free the instance of derived class of SkExample. The latest skia code show error when build SkiaExamples by "ninja -C out/Release SkiaExamples": error: ‘class SkExample’ has virtual functions and accessible non-virtual destructor. R=caryclark@google.com Author: yunchao.he@intel.com Review URL: https://codereview.chromium.org/98463013 git-svn-id: http://skia.googlecode.com/svn/trunk@12728 2bbb7eff-a529-9590-31e7-b0007b416f81
* change SkScalarRound to SkScalarRoundToIntGravatar reed@google.com2013-12-17
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/105073006 git-svn-id: http://skia.googlecode.com/svn/trunk@12720 2bbb7eff-a529-9590-31e7-b0007b416f81
* deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. ↵Gravatar reed@google.com2013-12-17
| | | | | | | | | | | #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/111353003 git-svn-id: http://skia.googlecode.com/svn/trunk@12719 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floatsGravatar reed@google.com2013-12-17
| | | | | | | | | | | | | To keep the CL (slightly) managable, this does not make any changes to existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this time around. BUG= R=bsalomon@google.com, caryclark@google.com Review URL: https://codereview.chromium.org/117053002 git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a print function in the global JS scope for debugging.Gravatar commit-bot@chromium.org2013-12-16
| | | | | | | | | | | BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/100583005 git-svn-id: http://skia.googlecode.com/svn/trunk@12695 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add command line flag for optionally loading JS from external files.Gravatar commit-bot@chromium.org2013-12-16
| | | | | | | | | | | BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/111853008 git-svn-id: http://skia.googlecode.com/svn/trunk@12692 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added canvas.fillStyle with support for just the "#RRGGBB" style of colors.Gravatar commit-bot@chromium.org2013-12-11
| | | | | | | | | | | | | Also renamed drawRect to fillRect, which now take x,y,w,h parameters. BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/108813004 git-svn-id: http://skia.googlecode.com/svn/trunk@12621 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12617 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix error in r12597 (can't forget that newline at the end of a file)Gravatar robertphillips@google.com2013-12-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12598 2bbb7eff-a529-9590-31e7-b0007b416f81
* New Composite CSS border objectGravatar robertphillips@google.com2013-12-10
| | | | | | | | https://codereview.chromium.org/86263003/ git-svn-id: http://skia.googlecode.com/svn/trunk@12597 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a canvas object with drawRect() and inval().Gravatar commit-bot@chromium.org2013-12-10
| | | | | | | | | | | BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/110693002 git-svn-id: http://skia.googlecode.com/svn/trunk@12595 2bbb7eff-a529-9590-31e7-b0007b416f81
* A simple draw() function in Javascript.Gravatar commit-bot@chromium.org2013-12-06
| | | | | | | | | | R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/102803003 git-svn-id: http://skia.googlecode.com/svn/trunk@12527 2bbb7eff-a529-9590-31e7-b0007b416f81
* V8 and SkiaGravatar commit-bot@chromium.org2013-12-05
| | | | | | | | | | R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/93933005 git-svn-id: http://skia.googlecode.com/svn/trunk@12503 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkPdfNativeDoc::tokenizerOfStream.Gravatar scroggo@google.com2013-12-03
| | | | | | | | | | | | Instead, initialize an SkPdfNativeTokenizer directly on the stack. Fixes a memory leak in SkPdfFont. R=mtklein@google.com Review URL: https://codereview.chromium.org/100323003 git-svn-id: http://skia.googlecode.com/svn/trunk@12462 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use lowercase windows.h in includes to fix Windows cross compilation using ↵Gravatar bungeman@google.com2013-12-03
| | | | | | | | | | | | mingw. While it doesn't matter on Windows, mingw on case-sensitive OSes uses all lower case filenames for platform include files. I found the problem in SkCondVar.h from Mozilla checkout of skia sources, but the patch contains a fix for the whole skia tree. R=bungeman@google.com Review URL: https://codereview.chromium.org/99173003 git-svn-id: http://skia.googlecode.com/svn/trunk@12461 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12453 2bbb7eff-a529-9590-31e7-b0007b416f81
* Simplify SkPdfTokenLooper behavior.Gravatar scroggo@google.com2013-12-02
| | | | | | | | | | | | | | | | | | | | | | | Instead of passing a pointer to a pointer to a NULL looper, which can then be set to point to a new looper (which then must be looped and deleted), pass a pointer to the current looper. Each function can then create a looper based on the parent (on the stack) and call loop() itself. Remove setUp(). Now that there is a pointer to the parent at creation time, there is no need for this function. Modify the constructors to only provide ones that are needed. Add documentation. Remove PdfInlineImageLooper::done(), which is never used. R=mtklein@google.com Review URL: https://codereview.chromium.org/83183004 git-svn-id: http://skia.googlecode.com/svn/trunk@12447 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove some PdfViewer warnings.Gravatar scroggo@google.com2013-12-02
| | | | | | Fix build. git-svn-id: http://skia.googlecode.com/svn/trunk@12438 2bbb7eff-a529-9590-31e7-b0007b416f81
* Separate and update PDF_DIFF_TRACE_IN_PNGGravatar scroggo@google.com2013-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move its functionality out of readToken() and into its own class. Callers of the previous readToken() now call SkPdfNativeTokenizer::readToken(), which in turn calls a function for writing the diff to a file, if the caller requests it and PDF_TRACE_DIFF_IN_PNG is defined. Do not attempt to draw a diff for compatibility sections, which we do not draw. Use SkString to handle string manipulation. Hide globals only used by PDF_TRACE_DIFF_IN_PNG behind that flag. Remove hasVisualEffects, which always returns true. Rename gLastOpKeyword to gOpCounter for clarity. In SkPdfNativeTokenizer, set fEmpty to true when the entire stream has been read. Use SkBitmap::copyTo instead of manually copying an SkBitmap. Builds on https://codereview.chromium.org/79933003/ R=mtklein@google.com Review URL: https://codereview.chromium.org/80463005 git-svn-id: http://skia.googlecode.com/svn/trunk@12436 2bbb7eff-a529-9590-31e7-b0007b416f81
* Restructuring of PdfViewer code.Gravatar scroggo@google.com2013-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only change in behavior is that SkPdfAllocator on SkPdfContext is no longer allocated on the heap. In general, I have just moved code. SkPdfContext: Inherit from SkNoncopyable. Make SkPdfContext directly own fTmpPageAllocator. fTmpPageAllocator is created when SkPdfContext is, and destroyed at the same time as well, so there is no reason for the extra allocation. Add the function parseStream. This eliminates code duplication, and allows making fTmpPageAllocator private. Move PdfMainLooper into the implementation file, since it is now only used by parseStream. Move SkTDictWithDefaultConstructor and render stats info here, in support of PdfMainLooper. SkPdfTokenLooper: Rename PdfTokenLooper to SkPdfTokenLooper. Move readToken here, unchanged. Remove tokenizer(), which is unused. SkPdfNativeDoc: Remove tokenizerOfPage and tokenizerOfBuffer, which are unused. SkPdfOps: Move gPdfOps and PdfOperatorRenderer into a header file (hidden for now), so they can be accessed by both SkPdfRenderer.cpp and SkPdfContext.cpp. SkPdfRenderer: Harvest things into other files: PdfMainLooper (and the code that calls it) -> SkPdfContext. readToken -> SkPdfTokenLooper. R=mtklein@google.com Review URL: https://codereview.chromium.org/79933003 git-svn-id: http://skia.googlecode.com/svn/trunk@12435 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkFloatToScalar macroGravatar commit-bot@chromium.org2013-11-25
| | | | | | | | | | | BUG= R=reed@google.com, djsollen@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/85463005 git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move PdfTokenLooper into its own file.Gravatar scroggo@google.com2013-11-20
| | | | | | | | Otherwise, leave the class unchanged. Review URL: https://codereview.chromium.org/79773002 git-svn-id: http://skia.googlecode.com/svn/trunk@12333 2bbb7eff-a529-9590-31e7-b0007b416f81
* Ifdef guard for SkPdfContext.Gravatar scroggo@google.com2013-11-20
| | | | | | Review URL: https://codereview.chromium.org/79723002 git-svn-id: http://skia.googlecode.com/svn/trunk@12332 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move SkPdfContext into its own files.Gravatar scroggo@google.com2013-11-20
| | | | | | | | Otherwise, the class is unchanged. Review URL: https://codereview.chromium.org/77763007 git-svn-id: http://skia.googlecode.com/svn/trunk@12330 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make changes based on talks with Edison.Gravatar scroggo@google.com2013-11-20
| | | | | | | | | | Mostly FIXMEs, to go back and look at in more detail. Fix a bug where ET did not set fTextBlock back to false. Corresponds to notes in https://code.google.com/p/skia/source/detail?r=12270 git-svn-id: http://skia.googlecode.com/svn/trunk@12329 2bbb7eff-a529-9590-31e7-b0007b416f81
* Changes to SkTDStackNester.Gravatar scroggo@google.com2013-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkTDStackNester is a class used by PdfViewer to assist in saving and restoring the PDF state. Clean up and test this class. Add some documentation. Add FIXME's where I have questions to resolve. Fix a bug where fNestingLevel was not initialized. Remove a commented out line of code copied over from SkTDStack. Rename SkTDStackNester::nests() to nestingLevel() and make it const. Remove unnecessary predeclaration and friend declaration. Remove index() (both const and non-const versions). They were unused, return something that may not be expected (index from the top, rather than from the bottom), and don't work to get any elements in earlier Recs once the first one is full. Report a warning if the nesting level goes above the maximum level, or if we attempt to bring it below zero. Prevent fNestingLevel from dropping below zero. Add kUnusedObject_SkPdfIssue, and use it where appropriate. Depends on https://codereview.chromium.org/64093009/ R=mtklein@google.com Review URL: https://codereview.chromium.org/68843006 git-svn-id: http://skia.googlecode.com/svn/trunk@12328 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move SkTDStackNester into its own private file.Gravatar scroggo@google.com2013-11-20
| | | | | | | | | | | | Also remove depth(), which is unused. Otherwise the class is unchanged. R=mtklein@google.com Review URL: https://codereview.chromium.org/64093009 git-svn-id: http://skia.googlecode.com/svn/trunk@12324 2bbb7eff-a529-9590-31e7-b0007b416f81
* Hide unused gFormats.Gravatar mtklein@google.com2013-11-20
| | | | | | | | | | | Presumably this is WIP code? Otherwise, we delete it? BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/78503003 git-svn-id: http://skia.googlecode.com/svn/trunk@12321 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add missing (trivial) virtual destructors.Gravatar mtklein@google.com2013-11-20
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/78543002 git-svn-id: http://skia.googlecode.com/svn/trunk@12312 2bbb7eff-a529-9590-31e7-b0007b416f81
* Pdfviewer refactoring.Gravatar scroggo@google.com2013-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly superficial changes, to help me make sure I understand the code while making modifications. SkPdfRenderer: First class I'm modifying. Move it into include/ and src/ directories. Inherit from SkNoncopyable. Replace load() with factory function which returns NULL if the load fails. Remove unload() and loaded(), which no longer make sense, since the factory will return NULL on a failure to load, and unload() happens on destruction. Use a const char* for loading a PDF, following the convention of SkStream::NewFromFile. Remove unnecessary call to sqrt in SkPDFNativeRenderToBitmap. Also in SkPDFNativeRenderToBitmap, use an appropriate SkScalar macro to convert to an integer. Use this-> when calling member functions. pdf_viewer_main.cpp: Call the new interface for SkPdfRenderer. gyp files: Refer to the new location of SkPdfRenderer. R=edisonn@google.com Review URL: https://codereview.chromium.org/59493011 git-svn-id: http://skia.googlecode.com/svn/trunk@12296 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix warnings and Win only error in pdf_viewer.Gravatar scroggo@google.com2013-11-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12292 2bbb7eff-a529-9590-31e7-b0007b416f81
* Include SkBitmapDevice for pdf_viewer.Gravatar scroggo@google.com2013-11-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12289 2bbb7eff-a529-9590-31e7-b0007b416f81
* pdfviewer: readobject can return null, and catalog can be nullGravatar edisonn@google.com2013-11-13
| | | | | | Review URL: https://codereview.chromium.org/72053002 git-svn-id: http://skia.googlecode.com/svn/trunk@12276 2bbb7eff-a529-9590-31e7-b0007b416f81
* drawPosTextOnPath is now deprecated, removing all overrides and implsGravatar reed@google.com2013-11-13
| | | | | | | | | BUG= R=djsollen@google.com Review URL: https://codereview.chromium.org/61743017 git-svn-id: http://skia.googlecode.com/svn/trunk@12270 2bbb7eff-a529-9590-31e7-b0007b416f81
* pdfviewer: remove sqrt from the formula computing the scale (DPI is dots per ↵Gravatar edisonn@google.com2013-11-12
| | | | | | | | inch, not dots per square inch) Review URL: https://codereview.chromium.org/70793003 git-svn-id: http://skia.googlecode.com/svn/trunk@12258 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a script for running pdfviewer and comparing to existing results.Gravatar scroggo@google.com2013-11-12
| | | | | | | | | | | | | For quick, local checking to see how changes to pdfviewer have changed PDF files. Scripts were originally written by edisonn, and updated here for checkin. R=epoger@google.com Review URL: https://codereview.chromium.org/62103008 git-svn-id: http://skia.googlecode.com/svn/trunk@12241 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use SkPathJoin and SkBasename in Pdfviewer.Gravatar scroggo@google.com2013-11-12
| | | | | | | | | | Remove redundant code. R=edisonn@google.com Review URL: https://codereview.chromium.org/68263003 git-svn-id: http://skia.googlecode.com/svn/trunk@12240 2bbb7eff-a529-9590-31e7-b0007b416f81
* pdfviewer: fix build break in windows (wrong return type on function)Gravatar edisonn@google.com2013-11-11
| | | | | | Review URL: https://codereview.chromium.org/68973002 git-svn-id: http://skia.googlecode.com/svn/trunk@12216 2bbb7eff-a529-9590-31e7-b0007b416f81