aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
Commit message (Collapse)AuthorAge
* samplecode: Avoid temporary variables of SkString type.Gravatar tfarina@chromium.org2012-09-30
| | | | | | | | | | Just like most of the other samples, just pass the name of the sample directly. R=epoger@google.com Review URL: https://codereview.appspot.com/6572047 git-svn-id: http://skia.googlecode.com/svn/trunk@5743 2bbb7eff-a529-9590-31e7-b0007b416f81
* samplecode: Remove duplicated include of SkWindow.h from SampleApp.hGravatar tfarina@chromium.org2012-09-29
| | | | | | | | R=epoger@google.com Review URL: https://codereview.appspot.com/6566051 git-svn-id: http://skia.googlecode.com/svn/trunk@5737 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SampleApp work on iPhone/iOS simulator.Gravatar bsalomon@google.com2012-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | Several parts to this: 1) The DeviceManager subclass for iOS was rewritten because the base class changed. 2) Two old samples that rely on hardcoded paths to images are deleted. They hit assertions in SkImageRef. No one has the required images to run these anyway. 3) argv must be non-NULL. 4) The UI delegate must not be loaded from the NIB for viewDidLoad ordering reasons. So I removed an IBOutlet link from the window to the splitview controller in the iPad's NIB file. The split view is attached by the AppDelegate programmatically. This doesn't make GPU work. That will come in a later change. Review URL: https://codereview.appspot.com/6561056/ git-svn-id: http://skia.googlecode.com/svn/trunk@5712 2bbb7eff-a529-9590-31e7-b0007b416f81
* samplecode: Remove executable bit from SampleTextureDomain.cppGravatar tfarina@chromium.org2012-09-26
| | | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6570056 git-svn-id: http://skia.googlecode.com/svn/trunk@5703 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkCanvas::setDevice() must die, and so we begin by removing our ownGravatar mike@reedtribe.org2012-09-26
| | | | | | | | references to setBitmapDevice() (gotta walk before we can run) git-svn-id: http://skia.googlecode.com/svn/trunk@5680 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-09-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5678 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reimplement drawBitmapRectToRect to correctly handle fraction srcRect.Gravatar reed@google.com2012-09-25
| | | | | | | | | | | | | | | | | | | | | | | | The prev impl relied on drawBitmap "deducing" the destination rect by applying the computed matrix to the bitmap's bounds. This cannot be done if the srcRect is fractional, and therefore not representable w/ a bitmap. The new impl computes the same matrix, but calls down to the device via drawRect + a bitmap_shader. This allows us to specfiy the dstRect explicitly. The possible down-side is that we now rely on the device subclass to efficiently handle draRect+shader, instead of calling its drawBitmap entry-point. To give the device the chance to handle this differently, I now call through to a new device virtual: drawBitmapRect. The default impl is to create the shader and call drawRect, but a subclass can intercept that. For now, the GPU override of drawBitmapRect is mimicing the old behavior (by rounding the srcRect to an iRect). This preserves its ability to call drawBitmap which handles very-large textures, but shows some gittering/imprecision, due to the rounding. ... this is the same GPU behavior we have before this CL. Review URL: https://codereview.appspot.com/6542065 git-svn-id: http://skia.googlecode.com/svn/trunk@5663 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a header for OverView.cpp as well.Gravatar tfarina@chromium.org2012-09-18
| | | | | | | | | | This fixes another FIXMEs. Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: https://codereview.appspot.com/6492125 git-svn-id: http://skia.googlecode.com/svn/trunk@5576 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add file I forgot in https://code.google.com/p/skia/source/detail?r=5552Gravatar epoger@google.com2012-09-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5554 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a header file for TransitionView.cppGravatar epoger@google.com2012-09-14
| | | | | | committed from https://codereview.appspot.com/6492119/ for Thiago Farina <tfarina@chromium.org> git-svn-id: http://skia.googlecode.com/svn/trunk@5552 2bbb7eff-a529-9590-31e7-b0007b416f81
* Address warnings from clang build botGravatar robertphillips@google.com2012-09-13
| | | | | | | | http://codereview.appspot.com/6506111/ git-svn-id: http://skia.googlecode.com/svn/trunk@5518 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make texteffects gm work through serialization and pipe.Gravatar scroggo@google.com2012-09-12
| | | | | | | | | | | | | | | Move Line2DPathEffect (now Sk_) into a separate header file so it can be shared and initialized. Switch to the shared version in SampleAll and SampleSlides. Remove the skip pipe flag from texteffects, since it can now be serialized. I have a separate change to turn serialization on by default at https://codereview.appspot.com/6498121/ Review URL: https://codereview.appspot.com/6503106 git-svn-id: http://skia.googlecode.com/svn/trunk@5512 2bbb7eff-a529-9590-31e7-b0007b416f81
* update MS counter to show actual millisecondsGravatar reed@google.com2012-09-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5458 2bbb7eff-a529-9590-31e7-b0007b416f81
* apend sample_grab file name with .pngGravatar reed@google.com2012-09-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5451 2bbb7eff-a529-9590-31e7-b0007b416f81
* change duration of transition animation to 1, effectively removing it (for now)Gravatar reed@google.com2012-09-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5450 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-08-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5373 2bbb7eff-a529-9590-31e7-b0007b416f81
* (disabled) option to re-record a picture when loadingGravatar reed@google.com2012-08-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5366 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part III of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6475053 git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move tiling up into SampleWindow.Gravatar scroggo@google.com2012-08-17
| | | | | | | | Now the tiles do not move with the view, and tiling persists when changing slides. Review URL: https://codereview.appspot.com/6450143 git-svn-id: http://skia.googlecode.com/svn/trunk@5146 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SK_FONTHOST_WIN_DW define.Gravatar bungeman@google.com2012-08-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5132 2bbb7eff-a529-9590-31e7-b0007b416f81
* DirectWrite font host for skia.Gravatar bungeman@google.com2012-08-16
| | | | | | | https://codereview.appspot.com/5417063/ git-svn-id: http://skia.googlecode.com/svn/trunk@5128 2bbb7eff-a529-9590-31e7-b0007b416f81
* Extended Inst counting to find "unknown" leaked object (SkTMaskGamma)Gravatar robertphillips@google.com2012-08-16
| | | | | | | | http://codereview.appspot.com/6453127/ git-svn-id: http://skia.googlecode.com/svn/trunk@5123 2bbb7eff-a529-9590-31e7-b0007b416f81
* change tiling to 16 tiles instead of 4Gravatar reed@google.com2012-08-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5120 2bbb7eff-a529-9590-31e7-b0007b416f81
* Provide a key to go to the previous slide in SampleApp.Gravatar scroggo@google.com2012-08-15
| | | | | | | | | | The left key now mirrors the right key, and goes to the previous slide. It used to change the device type, which can still be done by pressing 'd' or using the menu. Review URL: https://codereview.appspot.com/6443133 git-svn-id: http://skia.googlecode.com/svn/trunk@5119 2bbb7eff-a529-9590-31e7-b0007b416f81
* add 't' to toggle tiling modesGravatar reed@google.com2012-08-15
| | | | | | Review URL: https://codereview.appspot.com/6446138 git-svn-id: http://skia.googlecode.com/svn/trunk@5109 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing source files that do not have newlines at the end.Gravatar rmistry@google.com2012-08-14
| | | | | | | | Found using the new unsubmitted newline_checker slave script: piraeus.cnc.corp.google.com:10125/builders/Skia_House_Keeping/builds/5/steps/shell_1/logs/stdio Review URL: https://codereview.appspot.com/6443124 git-svn-id: http://skia.googlecode.com/svn/trunk@5097 2bbb7eff-a529-9590-31e7-b0007b416f81
* move texteffects from Sample to gmGravatar mike@reedtribe.org2012-08-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5051 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkShape (unused)Gravatar reed@google.com2012-08-09
| | | | | | Review URL: https://codereview.appspot.com/6461069 git-svn-id: http://skia.googlecode.com/svn/trunk@5033 2bbb7eff-a529-9590-31e7-b0007b416f81
* privatize SkEdgeClipper.hGravatar mike@reedtribe.org2012-08-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5027 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update SkFlattenable buffers to be more modular.Gravatar djsollen@google.com2012-08-07
| | | | | | | | | | | | | | | | | This CL is an effort to stage the conversion to named parameters for all SkFlattenable commands. This particular stage only does the following two things... 1. Move flattenable buffers from SkFlattenable.h into their own header. 2. Update and Add new read write methods for better clarity and convenience. BUG= Review URL: https://codereview.appspot.com/6448095 git-svn-id: http://skia.googlecode.com/svn/trunk@4980 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert gpu-less mac sample app, remove busted sample (that has equivalent gm)Gravatar bsalomon@google.com2012-08-03
| | | | | | | | Review URL: https://codereview.appspot.com/6450088/ git-svn-id: http://skia.googlecode.com/svn/trunk@4954 2bbb7eff-a529-9590-31e7-b0007b416f81
* --picture foo now works if foo is an image (.png, .jpeg) or a picture (.skp)Gravatar reed@google.com2012-08-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4944 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create GPU-less build of Skia.Gravatar bsalomon@google.com2012-08-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4912 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added --picture flag to SampleApp, loads individual skp.Gravatar chudy@google.com2012-08-01
| | | | | | Review URL: https://codereview.appspot.com/6452077 git-svn-id: http://skia.googlecode.com/svn/trunk@4895 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed minor memory leaksGravatar robertphillips@google.com2012-07-31
| | | | | | | | http://codereview.appspot.com/6453066/ git-svn-id: http://skia.googlecode.com/svn/trunk@4866 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix LayerDrawLooper to record its fFlagsMaskGravatar reed@google.com2012-07-31
| | | | | | | | convert SampleDrawLooper to a GM git-svn-id: http://skia.googlecode.com/svn/trunk@4854 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed Windows compiler complaintsGravatar robertphillips@google.com2012-07-10
| | | | | | | | http://codereview.appspot.com/6392044 git-svn-id: http://skia.googlecode.com/svn/trunk@4511 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add an SK_PRINTF_LIKE macro, which declares a function to have printf-likeGravatar senorblanco@chromium.org2012-07-09
| | | | | | | | | | | | | semantics, allowing gcc and clang to check the format string against the arguments. Enable its use on SkString (printf, appendf, and prependf). Also define an SK_SIZE_T_SPECIFIER macro so there's a cross-platform way of printing a size_t. Review URL: http://codereview.appspot.com/6375043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4485 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added GPU implementation of 2-point conical gradient.Gravatar rileya@google.com2012-07-03
| | | | | | Review URL: https://codereview.appspot.com/6354062 git-svn-id: http://skia.googlecode.com/svn/trunk@4442 2bbb7eff-a529-9590-31e7-b0007b416f81
* Properly handle extracted bitmaps in cross process/shared addr space SkGPipe.Gravatar scroggo@google.com2012-07-02
| | | | | | | | | | | Use the pixel ref which we have already copied and the appropriate pixel ref offset. Turn SampleDrawBitmap into a GM to test this functionality. Review URL: https://codereview.appspot.com/6348059 git-svn-id: http://skia.googlecode.com/svn/trunk@4417 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkInstCnt tracking of SkViewRegistryGravatar reed@google.com2012-06-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4352 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't add SkViewRegistry to SkInstCntGravatar reed@google.com2012-06-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4351 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
* Rename the existing flatten(void*) methods.Gravatar djsollen@google.com2012-06-08
| | | | | | | | This change avoids naminc confusion with the SkFlattenable flatten methods and also changes SkPath to use the void* model instead of taking a SkReader32. Review URL: https://codereview.appspot.com/6299062 git-svn-id: http://skia.googlecode.com/svn/trunk@4215 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a tiled pipe mode to SampleApp.Gravatar scroggo@google.com2012-06-08
| | | | | | | | | | Using the "Pipe" checkbox in SamleApp, you can now toggle amongst three states: no pipe, a normal pipe (or others depending on #defines), and a tiled pipe. You can also use shift + p to toggle. Review URL: https://codereview.appspot.com/6303055 git-svn-id: http://skia.googlecode.com/svn/trunk@4213 2bbb7eff-a529-9590-31e7-b0007b416f81
* one more warning suppressed (make unused codeGravatar caryclark@google.com2012-06-06
| | | | | | avoid bit rot) git-svn-id: http://skia.googlecode.com/svn/trunk@4191 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warnings on Mac in ssamplecodeGravatar caryclark@google.com2012-06-06
| | | | | | | | | | | | | | | | | | Fix these class of warnings: - unused functions - unused locals - sign mismatch - missing function prototypes - missing newline at end of file - 64 to 32 bit truncation The changes prefer to link in dead code in the debug build with 'if (false)' than to comment it out, but trivial cases are commented out or sometimes deleted if it appears to be a copy/paste error. Review URL: https://codereview.appspot.com/6301044 git-svn-id: http://skia.googlecode.com/svn/trunk@4183 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed Linux compiler complaintsGravatar robertphillips@google.com2012-06-04
| | | | | | | | http://codereview.appspot.com/6269045/ git-svn-id: http://skia.googlecode.com/svn/trunk@4135 2bbb7eff-a529-9590-31e7-b0007b416f81
* --pictureDir foo will load serialized pictures <>.skp from the foo directoryGravatar reed@google.com2012-06-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4132 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