Commit Graph

2045 Commits

Author SHA1 Message Date
robertphillips@google.com
0a4805e33f First pass at Comment API
https://codereview.chromium.org/13957009/



git-svn-id: http://skia.googlecode.com/svn/trunk@9310 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 13:24:23 +00:00
junov@chromium.org
66070a527c Changing SkDeferredCanvas to use factories for creation
The objective of this change is to remove all calls to 
SkCanvas::setDevice. The factory API is hidden behind
a build flag in order to ease the roll into chromium.

A side-effect of the factory pattern is that it will
no longer be possible to allocate a SkDeferredCanvas on
the stack.  This changes nothing for chrome, but it
impacts skia test programs.

Review URL: https://codereview.chromium.org/16040002

git-svn-id: http://skia.googlecode.com/svn/trunk@9298 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 17:39:08 +00:00
commit-bot@chromium.org
bb6a3178c3 Make GrContext track the current matrix, render target, and clip directly rather than using GrDrawState.
R=robertphillips@google.com, jvanverth@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/15821008

git-svn-id: http://skia.googlecode.com/svn/trunk@9297 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 17:25:49 +00:00
scroggo@google.com
ccd7afb6fb Reland 'Add path utils, plus a test for it.'
Build SkPathJoin and SkBasename on windows also.

Previous CL did not build on Windows because the two functions were
accidentally placed inside an ifdef that did not include windows.
Move the functions to the top of the file, and add a comment by the
endif for clarity.

Previously reviewed at https://codereview.chromium.org/15747004/

Review URL: https://codereview.chromium.org/15740024

git-svn-id: http://skia.googlecode.com/svn/trunk@9295 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 16:45:07 +00:00
djsollen@google.com
40078cb49e Android specific changes that are upstreamed from the android framework.
R=reed@google.com

Review URL: https://codereview.chromium.org/15720006

git-svn-id: http://skia.googlecode.com/svn/trunk@9283 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-24 20:31:57 +00:00
scroggo@google.com
dbbcaa8983 Revert "Add path utils, plus a test for it."
This reverts commit d172374b46cae0bd5d7c024b9848f5bdafcc6a16.

This CL broke on Windows.

Review URL: https://codereview.chromium.org/15986004

git-svn-id: http://skia.googlecode.com/svn/trunk@9278 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-24 18:28:57 +00:00
scroggo@google.com
1bee037044 Add path utils, plus a test for it.
SkOSFile:
Added class SkOSPath with functions for
modifying strings representing path names.

OSPathTest.cpp:
Test of the new utilities.

factory.cpp:
Use SkPathJoin.

gmmain and gm_expectations:
Use SkOSPath::SkPathJoin instead of a local version.

skimage_main.cpp:
Use the new location of SkPathJoin and SkBasename.

R=epoger@google.com

Review URL: https://codereview.chromium.org/15747004

git-svn-id: http://skia.googlecode.com/svn/trunk@9277 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-24 18:12:17 +00:00
junov@chromium.org
7070f76b90 Adding setSurface public API method to SkDeferredCanvas
The purpose of this change is to provide an API that Blink 2D canvas layers can use
to install a new render target when recovering from a lost graphics context.

Review URL: https://codereview.chromium.org/15896005

git-svn-id: http://skia.googlecode.com/svn/trunk@9276 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-24 17:13:00 +00:00
scroggo@google.com
24287c15d6 Revert "Patch to prevent chromium breakage until the DEPS."
This reverts commit d2a284728d30082d46b02c39d916294c6d36e11f.

Review URL: https://codereview.chromium.org/16019005

git-svn-id: http://skia.googlecode.com/svn/trunk@9275 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-24 16:31:30 +00:00
senorblanco@chromium.org
68400767be Remove SkImageFilter::getInputResult(), since its return value is not
style-compliant, and doesn't allow us to abort on failure.

R=reed@google.com

Committed: https://code.google.com/p/skia/source/detail?r=9245

Review URL: https://codereview.chromium.org/15600003

git-svn-id: http://skia.googlecode.com/svn/trunk@9274 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-24 15:04:07 +00:00
reed@google.com
3d3a860d0b Add flag to gradients to interpolate colors in premul space. Experimental API to encapsulate the shared parameters for all gradients into a struct.
BUG=
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/15893002

git-svn-id: http://skia.googlecode.com/svn/trunk@9273 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-24 14:58:44 +00:00
commit-bot@chromium.org
abcec6db9b remove outdated debugging code now that we no longer support fixed point
R=reed@google.com, djsollen@google.com

Author: djsollen@google.com

Review URL: https://chromiumcodereview.appspot.com/15879003

git-svn-id: http://skia.googlecode.com/svn/trunk@9258 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-23 16:41:42 +00:00
robertphillips@google.com
0f2b1953c7 Fix bug in SkAutoSMalloc::reset
https://codereview.chromium.org/15858007/



git-svn-id: http://skia.googlecode.com/svn/trunk@9257 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-23 14:59:40 +00:00
robertphillips@google.com
1202c2ac56 Add printing of SkColorFilter-derived classes to debugger
https://codereview.chromium.org/15697012/



git-svn-id: http://skia.googlecode.com/svn/trunk@9255 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-23 14:00:17 +00:00
skia.committer@gmail.com
2d816ad36e Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9252 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-23 07:01:22 +00:00
robertphillips@google.com
f0656c140a Reverting r9245 due to Chrome breakage
git-svn-id: http://skia.googlecode.com/svn/trunk@9250 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-22 23:56:49 +00:00
commit-bot@chromium.org
be879bcda3 Mark SkDrawPictureCallback with SK_API, so that it can be derived from by SK_API classes
R=reed@google.com

Author: vmpstr@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15745015

git-svn-id: http://skia.googlecode.com/svn/trunk@9249 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-22 21:11:42 +00:00
reed@google.com
3597b73bc6 expand SkLua to handle creation of its own State
add lua sample

BUG=
R=robertphillips@google.com

Review URL: https://codereview.chromium.org/15742009

git-svn-id: http://skia.googlecode.com/svn/trunk@9247 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-22 20:12:50 +00:00
senorblanco@chromium.org
be1d02e528 Remove SkImageFilter::getInputResult(), since its return value is not
style-compliant, and doesn't allow us to abort on failure.

R=reed@google.com

Review URL: https://codereview.chromium.org/15600003

git-svn-id: http://skia.googlecode.com/svn/trunk@9245 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-22 18:59:58 +00:00
reed@google.com
74ce6f046c add dumpops.lua as a sample scraper that just dumps the arguments
add SkLua.h for common utilities

BUG=
R=rmistry@google.com

Review URL: https://codereview.chromium.org/15737010

git-svn-id: http://skia.googlecode.com/svn/trunk@9242 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-22 15:13:18 +00:00
reed@google.com
25b3bd58df add kBicubicFilterBitmap_Flag to paint, just for testing purposes.
BUG=

Review URL: https://codereview.chromium.org/15553005

git-svn-id: http://skia.googlecode.com/svn/trunk@9236 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-22 13:55:54 +00:00
bsalomon@google.com
9eb6645956 Add return param to SkAutoSMalloc::reset() that indicates whether the allocation changed or not.
Review URL: https://codereview.chromium.org/15558005

git-svn-id: http://skia.googlecode.com/svn/trunk@9235 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-22 13:35:37 +00:00
commit-bot@chromium.org
8f838259ab Add methods to SkLayerDrawLooper to allow adding layers on top
as well as on the bottom.

This is more convenient for some callers who generate layers
from a data structure in bottom-to-top, rather than top-to-bottom,
order.

BUG=242529
R=tomhudson@chromium.org

Author: jbroman@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15314003

git-svn-id: http://skia.googlecode.com/svn/trunk@9233 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-22 12:35:50 +00:00
reed@google.com
b83cb9bf89 add SkLerpXfermode
BUG=
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/15602003

git-svn-id: http://skia.googlecode.com/svn/trunk@9229 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-21 21:33:11 +00:00
scroggo@google.com
edef4aa8d8 Patch to prevent chromium breakage until the DEPS.
Once https://codereview.chromium.org/15489004/ is submitted to
Skia, a DEPS roll into chrome will break due to a change in the
API. A long term fix for chrome to use the new API is at
https://codereview.chromium.org/15496006/, but since it depends
on the earlier Skia change, this patch fills in the gap.

Will be reverted once https://codereview.chromium.org/15496006/
is submitted to chrome.

R=djsollen@google.com

Review URL: https://codereview.chromium.org/15538005

git-svn-id: http://skia.googlecode.com/svn/trunk@9228 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-21 20:45:03 +00:00
scroggo@google.com
1b1bcc3cea New API for encoding bitmaps during serialization.
This change gives more flexibility to the implementation of
EncodeBitmap to prefer calling refEncodedData, doing its own
encode, or even doing both and making a decision about which
to use.

The new function signature also allows the implementation to
tell the ordered write buffer whether to store the pixel offset,
in the case where the encoded bitmap represents the larger
bitmap, or to ignore the pixel offset, in the case where the
implementation only encoded the subset that is used.

Requires changes to chromium to use the new function signature.
(https://codereview.chromium.org/15496006/)

SkPicture:
New API for EncodeBitmap.

SkOrderedReadBuffer:
Ifdef'd out addition of reading the offset.

SkOrderedWriteBuffer:
Never call refEncodedData. Allow the user to call that from their
EncodeBitmap function, if desired.
This addresses https://code.google.com/p/skia/issues/detail?id=1239
Add in ifdef'd out code to record the offset.

PictureTest and PictureRenderer:
Implement the new definition of EncodeBitmap. Also update the name
of the function to meet coding style guidelines.

BUG=https://code.google.com/p/skia/issues/detail?id=1239
R=reed@google.com

Review URL: https://codereview.chromium.org/15489004

git-svn-id: http://skia.googlecode.com/svn/trunk@9226 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-21 20:31:23 +00:00
djsollen@google.com
bfae9d373c Add a fontConfig interface for android.
The contents of this CL are based on the SkFontHost_android.cpp found
in the android repository.

BUG=
R=reed@google.com

Review URL: https://codereview.chromium.org/14731025

git-svn-id: http://skia.googlecode.com/svn/trunk@9219 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-21 16:53:50 +00:00
djsollen@google.com
7768751b8b Add buffer helper to read directly into SkString to avoid extra copying
R=reed@google.com

Review URL: https://codereview.chromium.org/15179008

git-svn-id: http://skia.googlecode.com/svn/trunk@9218 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-21 16:17:14 +00:00
mike@reedtribe.org
f02fe3d4fe support SkCanvas as a real lua object
git-svn-id: http://skia.googlecode.com/svn/trunk@9208 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-21 12:20:39 +00:00
skia.committer@gmail.com
3e50e99fe7 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9207 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-21 07:01:40 +00:00
reed@google.com
74babdfce5 add SkDrawPictureCallback optional parameter to drawPicture(), which can abort the picture drawing.
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/14598023

git-svn-id: http://skia.googlecode.com/svn/trunk@9197 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-20 17:02:41 +00:00
reed@google.com
4b0757b748 add encodeData() to SkImageEncoder, and add encoding to SkImage
BUG=
R=scroggo@google.com

Review URL: https://codereview.chromium.org/15002004

git-svn-id: http://skia.googlecode.com/svn/trunk@9193 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-20 16:33:41 +00:00
skia.committer@gmail.com
845220b817 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9189 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-20 11:51:35 +00:00
bsalomon@google.com
20f7f173e0 One SkTSearch to rule them all. Allow key to be of different type than the array.
R=bungeman@google.com

Review URL: https://codereview.chromium.org/15070011

git-svn-id: http://skia.googlecode.com/svn/trunk@9182 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-17 19:05:03 +00:00
robertphillips@google.com
83d1a68141 Add special handling of rectori case for gpu
https://codereview.chromium.org/15080010/



git-svn-id: http://skia.googlecode.com/svn/trunk@9175 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-17 12:50:27 +00:00
djsollen@google.com
9401deeb10 Make the use of fallback fonts in Android a runtime decision.
R=reed@google.com

Review URL: https://codereview.chromium.org/14972022

git-svn-id: http://skia.googlecode.com/svn/trunk@9168 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-16 18:38:43 +00:00
skia.committer@gmail.com
539f364e80 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9159 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-16 07:01:00 +00:00
reed@google.com
dff7e11c20 add SkLuaCanvas
add lua 5.2 to third_party

BUG=
R=bungeman@google.com

Review URL: https://codereview.chromium.org/14907017

git-svn-id: http://skia.googlecode.com/svn/trunk@9149 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-15 19:34:20 +00:00
scroggo@google.com
f98118e65c Provide a function to print the name of a Format.
Also use SkToU32 instead of a flat cast.

R=djsollen@google.com

Review URL: https://codereview.chromium.org/14565005

git-svn-id: http://skia.googlecode.com/svn/trunk@9139 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-15 14:53:49 +00:00
commit-bot@chromium.org
5da3f22003 Fix includes in SkLayerDrawLooper.h. It was previously not possible to
include this header unless SkPoint and SkPaint were previously defined.

BUG=
R=reed@google.com, senorblanco@chromium.org

Author: jbroman@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14607015

git-svn-id: http://skia.googlecode.com/svn/trunk@9130 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-14 20:11:23 +00:00
robertphillips@google.com
afd1cba523 Re-add isIRect test for AA rect drawing
https://codereview.chromium.org/14820035/



git-svn-id: http://skia.googlecode.com/svn/trunk@9128 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-14 19:47:47 +00:00
commit-bot@chromium.org
c7a20e4093 API modifications needed to upstream Android font changes.
Committed: http://code.google.com/p/skia/source/detail?r=9083

R=reed@google.com

Author: djsollen@google.com

Review URL: https://chromiumcodereview.appspot.com/14761003

git-svn-id: http://skia.googlecode.com/svn/trunk@9107 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-13 14:09:13 +00:00
commit-bot@chromium.org
3f4ea26ff5 Check for NULL texture in GrAutoScratchTexture::detach()
R=sugoi@chromium.org, robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/14683009

git-svn-id: http://skia.googlecode.com/svn/trunk@9104 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-11 13:21:43 +00:00
bsalomon@google.com
94b284d719 Remove GrPathCmd
R=reed@google.com

Review URL: https://codereview.chromium.org/15068008

git-svn-id: http://skia.googlecode.com/svn/trunk@9097 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-10 17:14:06 +00:00
robertphillips@google.com
114eb9e699 Update shader rect drawing path for r9087 (removal of isIRect "opt")
https://codereview.chromium.org/14972013/

(SkipBuildbotRuns)



git-svn-id: http://skia.googlecode.com/svn/trunk@9089 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-10 13:16:13 +00:00
robertphillips@google.com
18136d1cf2 Remove isIRect "optimization" & defer computation of device Rect in AA rect rendering
https://chromiumcodereview.appspot.com/14890021/



git-svn-id: http://skia.googlecode.com/svn/trunk@9087 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-10 11:05:58 +00:00
robertphillips@google.com
e55491d846 Reverting 9083 & 9084 due to Android failures
git-svn-id: http://skia.googlecode.com/svn/trunk@9085 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-09 22:47:33 +00:00
commit-bot@chromium.org
14451703f1 API modifications needed to upstream Android font changes.
R=reed@google.com

Author: djsollen@google.com

Review URL: https://chromiumcodereview.appspot.com/14761003

git-svn-id: http://skia.googlecode.com/svn/trunk@9083 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-09 20:54:20 +00:00
epoger@google.com
4a8084ced3 Revert r9081
Review URL: https://codereview.chromium.org/14773022

git-svn-id: http://skia.googlecode.com/svn/trunk@9082 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-09 20:01:26 +00:00
epoger@google.com
3a8d3d06ea add SkString::append(const char c)
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/14813013

git-svn-id: http://skia.googlecode.com/svn/trunk@9081 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-09 19:37:41 +00:00