Commit Graph

2045 Commits

Author SHA1 Message Date
commit-bot@chromium.org
5d01bec07a Fix for effect cache key.
Adds the additional shift needed to incorporate the attribKeyBits.  Also simplifies the creation of the static globals for the edge effects.

Author: jvanverth@google.com

Reviewed By: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8498 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-02 20:48:38 +00:00
commit-bot@chromium.org
00aae979fa Remove unused header declaration.
BUG=1179


Author: djsollen@google.com

Reviewed By: reed@google.com,tomhudson@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8495 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-02 18:41:32 +00:00
edisonn@google.com
6addb19300 resubmit https://code.google.com/p/skia/source/detail?r=7883 (in the meantime we
added capability to collect minidump and callstack if buildbot fails with heap
coruption in windows, and a NPE bug was fixed in SkPDFDocument, when document was destroyed without ever beeing used and a field was NULL + a few minor conflicts have been resolved)

git-svn-id: http://skia.googlecode.com/svn/trunk@8487 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-02 15:33:08 +00:00
skia.committer@gmail.com
05a2ee052c Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8477 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-02 07:01:34 +00:00
robertphillips@google.com
a6c63a90d1 Fix another clang warning/error
git-svn-id: http://skia.googlecode.com/svn/trunk@8476 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 23:30:26 +00:00
jvanverth@google.com
86b5e29f80 Patches for r8468 build errors. Unreviewed.
git-svn-id: http://skia.googlecode.com/svn/trunk@8469 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 20:14:02 +00:00
jvanverth@google.com
054ae99d93 Take two for r8466:
Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set.

Original author: bsalomon@google.com

Author: jvanverth@google.com

Reviewed By: bsalomon@google.com,robertphillips@google.com

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


git-svn-id: http://skia.googlecode.com/svn/trunk@8468 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 20:06:51 +00:00
jvanverth@google.com
c7bf2963f0 Rolling back r8466.
Not reviewed.


git-svn-id: http://skia.googlecode.com/svn/trunk@8467 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 19:29:32 +00:00
commit-bot@chromium.org
fb495b537f Revise attribute binding interface.
Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set.

Original author: bsalomon@google.com

Author: jvanverth@google.com

Reviewed By: bsalomon@google.com,robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8466 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 19:12:42 +00:00
commit-bot@chromium.org
d7aaf6034e Add Xfermode bench. Also clear before rendering in bench (rather than after).
Author: bsalomon@google.com

Reviewed By: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8454 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 12:51:34 +00:00
commit-bot@chromium.org
bb5c46591c Trim the copy of the dst made for dst-reading effects using the clip and dev-bounds of draw.
Adds dev bounds to circles and rects drawn by GrDrawTarget base class (GrIODB already provides rect bounds).

Author: bsalomon@google.com

Reviewed By: robertphilips@google.com,jvanverth@google.com,robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8453 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 12:49:31 +00:00
bsalomon@google.com
26e18b593a Add support for reading the dst pixel value in an effect. Use in a new effect for the kDarken xfer mode.
The current implementation is to always make a copy of the entire dst before the draw.
It will only succeed if the RT is also a texture.
Obviously, there is lots of room for improvement.
Review URL: https://codereview.chromium.org/13314002

git-svn-id: http://skia.googlecode.com/svn/trunk@8449 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-29 19:22:36 +00:00
reed@google.com
964988f0e9 add matcher to fontstyleset
Review URL: https://codereview.chromium.org/13312002

git-svn-id: http://skia.googlecode.com/svn/trunk@8444 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-29 14:57:22 +00:00
bsalomon@google.com
123ac1d4ea Make GM render to render targets that are also textures.
Review URL: https://codereview.chromium.org/13211002

git-svn-id: http://skia.googlecode.com/svn/trunk@8438 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-28 19:18:12 +00:00
bsalomon@google.com
b8eb2e89ed Make GrGLShaderBuilder::TextureSampler extract only required info from GrTextureAccess.
This will make it possible to init a TextureSampler without a texture or a specific config.

Also unify two separate bitfields of color components in GPU code.
Review URL: https://codereview.chromium.org/13121002

git-svn-id: http://skia.googlecode.com/svn/trunk@8428 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-28 13:46:42 +00:00
bsalomon@google.com
73818dce93 Add GrPaint stage for xfermodes.
Review URL: https://codereview.chromium.org/12918032

git-svn-id: http://skia.googlecode.com/svn/trunk@8425 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-28 13:23:29 +00:00
bsalomon@google.com
f51c01328d Add interface to SkXfermode to return a GrEffect and blend coeffs.
Review URL: https://codereview.chromium.org/13097006

git-svn-id: http://skia.googlecode.com/svn/trunk@8412 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-27 18:31:15 +00:00
bsalomon@google.com
31ec7985f2 Move GrGLProgram::Desc out of GrGLProgram.
Review URL: https://codereview.chromium.org/12942014

git-svn-id: http://skia.googlecode.com/svn/trunk@8411 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-27 18:14:57 +00:00
tfarina@chromium.org
48552314f6 Fix a few clang errors while trying to build tools target.
Most of the errors were like:
../../src/gpu/gl/GrGLEffectMatrix.cpp:74:9: error: variable 'varyingType' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
../../src/gpu/gl/debug/GrDebugGL.h:125:21: error: private field 'fMaxTextureUnits' is not used [-Werror,-Wunused-private-field]
../../src/core/SkBitmapSampler.cpp:312:25: error: private field 'fProcTable' is not used [-Werror,-Wunused-private-field]

R=bsalomon@google.com,scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8403 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 21:48:58 +00:00
robertphillips@google.com
ad9327f036 Increase space for effect-class-ID and fix assert
https://codereview.chromium.org/12703040/



git-svn-id: http://skia.googlecode.com/svn/trunk@8400 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 19:35:06 +00:00
reed@google.com
83787c55db impl part of SKFontMgr for mac
Here is some test code

    SkFontMgr* mgr = SkFontMgr::RefDefault();
    for (int i = 0; i < mgr->countFamilies(); ++i) {
        SkString familyName;
        mgr->getFamilyName(i, &familyName);
        SkDebugf("%s\n", familyName.c_str());
        SkFontStyleSet* styles = mgr->createStyleSet(i);
        for (int j = 0; j < styles->count(); ++j) {
            SkFontStyle fs;
            SkString styleName;
            styles->getStyle(j, &fs, &styleName);
            SkTypeface* face = styles->createTypeface(j);
            SkDebugf("    %s [%d %d] %x\n", styleName.c_str(), fs.weight(),
                     fs.width(), face);
        }
        styles->unref();
    }
    mgr->unref();
Review URL: https://codereview.chromium.org/13094005

git-svn-id: http://skia.googlecode.com/svn/trunk@8395 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 17:19:15 +00:00
reed@google.com
e8be73b2d3 oops, don't say static for an extern function
git-svn-id: http://skia.googlecode.com/svn/trunk@8387 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 12:32:03 +00:00
reed@google.com
1fa793fa6b remove SkFontHost::NextLogicalFont, and add android-specific function
SkAndroidNextLogicalTypeface



git-svn-id: http://skia.googlecode.com/svn/trunk@8386 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 12:29:05 +00:00
skia.committer@gmail.com
e60ed08a35 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8383 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 07:01:04 +00:00
robertphillips@google.com
8cf10efe75 Reverting r8376, r8373 and r8371 due to Android shader compilation failures
git-svn-id: http://skia.googlecode.com/svn/trunk@8378 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 22:16:02 +00:00
reed@google.com
95625dbcb6 check-point (early) for fontmgr stuff, not called.
git-svn-id: http://skia.googlecode.com/svn/trunk@8377 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 20:44:02 +00:00
reed@google.com
50b14a26dc oops, fix name for SkCreateDataProviderFromData
git-svn-id: http://skia.googlecode.com/svn/trunk@8375 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 20:21:26 +00:00
reed@google.com
12b1f19c1f expose skdata -> cgdataprovider helper
git-svn-id: http://skia.googlecode.com/svn/trunk@8374 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 20:15:40 +00:00
bungeman@google.com
fe74765f0d Change fixedWidth to fixedPitch and implement on Windows.
https://codereview.appspot.com/7954044/


git-svn-id: http://skia.googlecode.com/svn/trunk@8372 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 19:36:11 +00:00
sugoi@google.com
2daa365123 New SVG turbulence in Skia
This cl contains the code for both CPU and GPU generation of noise. Both
codepaths yield equivalent results.

TEST:Added 'perlinnoise' gm
Review URL: https://codereview.chromium.org/13047005

git-svn-id: http://skia.googlecode.com/svn/trunk@8371 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 19:31:04 +00:00
reed@google.com
c452d82c82 move fontmgr into include/ports for now
git-svn-id: http://skia.googlecode.com/svn/trunk@8370 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 18:44:17 +00:00
bsalomon@google.com
c26d94fd7d Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps.
Pass caps to GrEffect::TestCreate() functions so that they can return effects that will work with the capabilities.
Review URL: https://codereview.chromium.org/12965018

git-svn-id: http://skia.googlecode.com/svn/trunk@8369 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 18:19:00 +00:00
reed@google.com
a45bcc8022 make SkFontHost::NextLogicalTypeface private (only called by SkScalerContext)
git-svn-id: http://skia.googlecode.com/svn/trunk@8363 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 14:55:34 +00:00
reed@google.com
e74f83bbfe remove SkFontHost::EnsureTypefaceAccessible declaration (no longer implemented or called)
git-svn-id: http://skia.googlecode.com/svn/trunk@8361 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 14:45:12 +00:00
reed@google.com
5526ede94a land https://codereview.chromium.org/12676024
git-svn-id: http://skia.googlecode.com/svn/trunk@8359 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 13:03:37 +00:00
skia.committer@gmail.com
7e32851d54 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8350 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-23 07:01:28 +00:00
commit-bot@chromium.org
81312830ef Move oval rendering code to GrOvalRenderer.
Author: jvanverth@google.com

Reviewed By: bsalomon@google.com,robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8345 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-22 18:34:09 +00:00
reed@google.com
292b1d4903 remove SkFontHost::OpenStream(), now subsumed by SkTypeface::openStream()
remove obsolete/abandoned SkFontHost_freetype_mac.cpp
Review URL: https://codereview.chromium.org/13008019

git-svn-id: http://skia.googlecode.com/svn/trunk@8342 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-22 17:21:59 +00:00
robertphillips@google.com
5ee708a235 Fix typo in SkTLazy.h's "operator delete"
git-svn-id: http://skia.googlecode.com/svn/trunk@8333 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-22 13:34:59 +00:00
mike@reedtribe.org
66d831dc74 remove SkFontHost::GetFileName
All remaining impls were either empty, or always return 0 for ttcIndex (its only value).
This functionality is now totally subsumed by SkTypeface::openStream()



git-svn-id: http://skia.googlecode.com/svn/trunk@8321 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-22 00:47:41 +00:00
mike@reedtribe.org
53872fb937 remove now obsolete GetAdvancedTypefaceMetrics API from SkFontHost
git-svn-id: http://skia.googlecode.com/svn/trunk@8319 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-21 23:59:26 +00:00
robertphillips@google.com
b7636d3fad Reverting 8313 (SVG turbulence) due to Ubuntu failures
git-svn-id: http://skia.googlecode.com/svn/trunk@8316 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-21 21:22:03 +00:00
reed@google.com
29b7e636be make OpenStream and GetFileName private (soon to go away)
git-svn-id: http://skia.googlecode.com/svn/trunk@8315 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-21 21:16:31 +00:00
sugoi@google.com
3067cc904d New SVG turbulence in Skia
This cl contains the code for both CPU and GPU generation of noise. Both codepaths yield equivalent results.

TEST:Added 'perlinnoise' gm
Review URL: https://codereview.appspot.com/7322060

git-svn-id: http://skia.googlecode.com/svn/trunk@8313 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-21 21:01:07 +00:00
reed@google.com
6c66d2f2b6 remove GetTable* APIs from SkFontHost, and rely on SkTypeface::onGetTable*
default impls call SkFontStream, and rely on SkTypeface::onOpenStream
Review URL: https://codereview.chromium.org/13001002

git-svn-id: http://skia.googlecode.com/svn/trunk@8310 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-21 20:34:27 +00:00
reed@google.com
2cdc6713fb add virtual SkTypeface::onOpenStream and override that for fontconfig
(other ports to follow)

When this is complete, we will be able to remove from SkFontHost
- OpenStream
- GetFileName
Review URL: https://codereview.chromium.org/12988002

git-svn-id: http://skia.googlecode.com/svn/trunk@8299 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-21 18:22:00 +00:00
reed@google.com
38c37ddbaf call onGetUPEM to subclasses can optimize it, and place default behavior
(calling getAdvancedTypefaceMetrics) in base impl.

This allows us to remove SkFontHost::GetUnitsPerEm entirely
Review URL: https://codereview.chromium.org/12915003

git-svn-id: http://skia.googlecode.com/svn/trunk@8295 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-21 15:36:26 +00:00
skia.committer@gmail.com
c1641fc922 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8281 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-21 07:01:39 +00:00
reed@google.com
2689f615e3 move impl of AdvancedTypefaceMetrics into typeface (3)
Review URL: https://codereview.chromium.org/12807004

git-svn-id: http://skia.googlecode.com/svn/trunk@8274 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 20:01:47 +00:00
bsalomon@google.com
c78188896e Attempt to reland 8264-5 with warning-as-error fixes.
git-svn-id: http://skia.googlecode.com/svn/trunk@8272 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 19:19:53 +00:00
reed@google.com
67e7cde5c5 revert 8265-8264 (broke build)
git-svn-id: http://skia.googlecode.com/svn/trunk@8268 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 17:47:16 +00:00
djsollen@google.com
113994051b Upstream changes from Android for decoding jpeg images.
Review URL: https://codereview.chromium.org/12438025

git-svn-id: http://skia.googlecode.com/svn/trunk@8267 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 17:45:27 +00:00
bsalomon@google.com
4d9853288b Fix build breakage.
git-svn-id: http://skia.googlecode.com/svn/trunk@8265 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 17:41:50 +00:00
bsalomon@google.com
ae81d5c4aa Adds local coords to GrEffect system.
Effects can ask the builder for local coords which may or may not be distinct from positions.

GrEffectStage tracks changes to relationship between pos and local coords.

GrGLEffectMatrix and GrSingleTextureEffect can use either pos or textures as intput coords

GrSimpleTextureEffect now allows for an explicit texture coords attribute.
Review URL: https://codereview.chromium.org/12531015

git-svn-id: http://skia.googlecode.com/svn/trunk@8264 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 17:32:27 +00:00
epoger@google.com
8e3fb2d6f4 comments only: update docs for SkStream::readData(), SkWStream::writeData()
BUG=https://code.google.com/p/skia/issues/detail?id=1167
Review URL: https://codereview.chromium.org/12604012

git-svn-id: http://skia.googlecode.com/svn/trunk@8260 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 15:56:03 +00:00
djsollen@google.com
a4ecab08b6 Remove unused declaration
Review URL: https://codereview.chromium.org/12704017

git-svn-id: http://skia.googlecode.com/svn/trunk@8257 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 15:50:59 +00:00
robertphillips@google.com
acef3c4082 Reverting r8233 (Use SkSet in PDF)
git-svn-id: http://skia.googlecode.com/svn/trunk@8255 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 14:42:51 +00:00
reed@google.com
f210f505ff add new API for gdi fonts (not hooked up yet)
git-svn-id: http://skia.googlecode.com/svn/trunk@8253 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 14:15:52 +00:00
skia.committer@gmail.com
01c34ee599 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8249 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 07:01:02 +00:00
robertphillips@google.com
f4b6763b95 Removed GrEffectStage::fVertexAttribCount to fix Chrome compilation warning/error
git-svn-id: http://skia.googlecode.com/svn/trunk@8245 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-20 00:28:46 +00:00
bsalomon@google.com
f3a60c09b9 Add support for IMG's MSAA extension.
Review URL: https://codereview.chromium.org/12875005

git-svn-id: http://skia.googlecode.com/svn/trunk@8241 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 19:06:09 +00:00
jvanverth@google.com
65eb4d5a21 Add stroked ovals and CircleEdgeEffect.
Adds some optimizations to the circle and ellipse shaders, static effect 
instances for their GrEffects, and some minor changes to GrDrawState::setEffect
to make GrEffect setup faster.


git-svn-id: http://skia.googlecode.com/svn/trunk@8238 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 18:51:02 +00:00
edisonn@google.com
66bedbb02d resubmit https://code.google.com/p/skia/source/detail?r=7883 (in the meantime we added capability to collect minidump and callstack if buildbot fails with heap coruption in windows. a few minor conflicts have been resolved)
Review URL: https://codereview.chromium.org/12840004

git-svn-id: http://skia.googlecode.com/svn/trunk@8233 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 17:19:05 +00:00
reed@google.com
0da48618a7 remove SkFontHost::CreateScalerContext
Review URL: https://codereview.chromium.org/12593013

git-svn-id: http://skia.googlecode.com/svn/trunk@8228 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 16:06:52 +00:00
sugoi@google.com
4ecd42e4bf Fix for displacement mapping
Fixed the skia displacement map effect to match the WebKit displacement map fix.
Review URL: https://codereview.chromium.org/12787007

git-svn-id: http://skia.googlecode.com/svn/trunk@8225 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 15:07:30 +00:00
reed@google.com
90808e87c2 Add SkTypeface* parameter to SkScalerContext (and its callers)
Use SkTypeface to create scalercontext instead of SkFontHost
Review URL: https://codereview.chromium.org/12706010

git-svn-id: http://skia.googlecode.com/svn/trunk@8223 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 14:44:54 +00:00
commit-bot@chromium.org
e4657ed7e1 Add a macro for querying the byte order of SkPMColor.
R=reed@google.com

Author: bsalomon@google.com

Reviewed By: reed@google.com,epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8219 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 14:16:31 +00:00
bsalomon@google.com
8a70eef71c Add MSAA configs to bench.
Review URL: https://codereview.chromium.org/12607013

git-svn-id: http://skia.googlecode.com/svn/trunk@8217 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 13:58:55 +00:00
skia.committer@gmail.com
8eaddb0089 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8211 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 07:15:10 +00:00
scroggo@google.com
bb281f7f96 Improvements/additions to SkImageCache/SkLazyPixelRef.
SkPurgeableImageCache:
New image cache that uses virtual memory to store the pixels. Combines
features of SkAshmemImageCache (which has been removed) with SkPurgeableMemoryBlock, which has android and Mac versions.

SkImageCache:
Modified the API. pinCache now returns a status out parameter which
states whether the pinned memory retained the old data. This allows
allocAndPinCache to only be used for allocations.
Add a new debug only interface to purge unpinned data.
Updates to documentation, clarifying behavior.
Changed CachedStatus to MemoryStatus

SkLruImageCache:
Implement the new function purgeAllUnpinnedCaches and change implementation
of pinCache for the new behavior.

SkLazyPixelRef:
Rewrite onLockPixels to account for the new behavior of pinCache.

BitmapFactoryTest:
Test the new SkPurgeableImageCache.
Write tests which directly test the SkImageCaches.
Create a larger bitmap, since some of the SkImageCaches are designed
to handle large bitmaps.

bench_ and render_pictures:
Consolidate lazy_decode_bitmap into one function.
Allow using a flag to specify using the purgeable image cache.
Clean up some #includes.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8207 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-18 21:37:39 +00:00
reed@google.com
e1575aa216 reland 8200 w/ fix for android (use fullpath instead of path)
Review URL: https://codereview.chromium.org/12921003

git-svn-id: http://skia.googlecode.com/svn/trunk@8206 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-18 21:08:46 +00:00
reed@google.com
070235e746 revert 8204 -- what is happening???
git-svn-id: http://skia.googlecode.com/svn/trunk@8205 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-18 20:53:49 +00:00
reed@google.com
4f7e846cd8 reland 8200 w/ fix for android (need fullpath instead of path)
git-svn-id: http://skia.googlecode.com/svn/trunk@8204 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-18 20:49:28 +00:00
reed@google.com
1311f7e7f4 revert 8200 to figure out android break
git-svn-id: http://skia.googlecode.com/svn/trunk@8201 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-18 19:32:58 +00:00
reed@google.com
d5ea2aeb60 move SK_MMAP_SUPPORT into SkPreConfig, so we can know about its availability
throughout the code.

Add SkData::NewFromMMap() help factory.

Refactor (now gone) SkMMapStream into SkStream::NewFromFile() factory
Review URL: https://codereview.chromium.org/12919013

git-svn-id: http://skia.googlecode.com/svn/trunk@8200 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-18 19:08:46 +00:00
robertphillips@google.com
0bd80fa01b Added toString to SkMaskFilter-derived classes
https://codereview.appspot.com/7889043/



git-svn-id: http://skia.googlecode.com/svn/trunk@8194 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-18 17:53:38 +00:00
skia.committer@gmail.com
c49cabfe5c Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8168 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-15 07:05:19 +00:00
commit-bot@chromium.org
bff83f61fa fix window's build errors
Author: djsollen@google.com

Reviewed By: bsalomon@google.com,borenet@google.com,reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8158 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-14 15:18:08 +00:00
reed@google.com
2d927e9532 make OpenStream and GetFileName public ... for now, until we fix FreeType backend.
git-svn-id: http://skia.googlecode.com/svn/trunk@8157 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-14 15:09:40 +00:00
reed@google.com
fed86bdb8b move most of SkFontHost to private (preceeding making it all private)
In this change, have to accomodate PDF wanting to call openStream and advancedMetrics
Review URL: https://codereview.chromium.org/12739006

git-svn-id: http://skia.googlecode.com/svn/trunk@8156 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-14 15:04:57 +00:00
commit-bot@chromium.org
a936e37cc7 Upstream Android modifications to the image encoders/decoders.
This CL does not update the libjpeg as that change is large enough
to warrant its own CL.


Author: djsollen@google.com

Reviewed By: reed@google.com,robertphillips@google.com,scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8155 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-14 14:42:18 +00:00
reed@google.com
2863f082f2 have reset() return its argument as a convenience
git-svn-id: http://skia.googlecode.com/svn/trunk@8141 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-13 21:28:44 +00:00
jvanverth@google.com
c3413d6f41 Increase bits for effect attribute key.
We can have an attribute index value up to 7, but only allow 2 bits for each
index in GrGLEffect::GenAttribKey. This change gives them 3 bits (and fixes an
assert when running tests in debug).

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


git-svn-id: http://skia.googlecode.com/svn/trunk@8140 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-13 21:05:14 +00:00
vandebo@chromium.org
dcf9c19d38 [PDF] Always set the symbolic Flag for Fonts.
This should fix Chrome bug 124572

Review URL: https://codereview.appspot.com/7631045

git-svn-id: http://skia.googlecode.com/svn/trunk@8136 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-13 20:01:51 +00:00
bsalomon@google.com
530efc8085 Remove extraneous paren.
Review URL: https://codereview.chromium.org/12750004

git-svn-id: http://skia.googlecode.com/svn/trunk@8125 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-13 13:38:30 +00:00
commit-bot@chromium.org
059a4c70d7 refactor android defines to implicitly assume NDK compliance unless it is explicitly marked as being specific to the android framework.
Author: djsollen@google.com

Reviewed By: reed@google.com,borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8124 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-13 12:48:26 +00:00
skia.committer@gmail.com
91274b9972 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8120 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-13 07:01:04 +00:00
edisonn@google.com
8c020612ba Update flag to reflect actual meaning.
Review URL: https://codereview.chromium.org/12754004

git-svn-id: http://skia.googlecode.com/svn/trunk@8118 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-12 19:53:16 +00:00
reed@google.com
1a64a54b27 add (temp) SkFontLCDConfig class to hold LCD getters/setters. This will allow
us to make SkFontHost.h private (once webkit switches to the SkFontLCDConfig api)

Stage 2 is to either move this code into chrome/webkit, or change the callers to
perform their own globals management.
Review URL: https://codereview.chromium.org/12623011

git-svn-id: http://skia.googlecode.com/svn/trunk@8107 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-12 15:41:18 +00:00
commit-bot@chromium.org
ff6ea2663f Add GrEllipseEdgeEffect.
Adds the effect that replaces the old oval rendering code. Also hooks in code to set attribute names and indices for effects.

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8092 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-12 12:26:08 +00:00
sugoi@google.com
e0e385c1d4 Removed unused parameters
I removed unused parameters wherever it was trivial to do so.
Review URL: https://codereview.chromium.org/12469002

git-svn-id: http://skia.googlecode.com/svn/trunk@8068 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-11 18:50:03 +00:00
skia.committer@gmail.com
eed625df23 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8059 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-09 07:01:15 +00:00
djsollen@google.com
4bd2bdbf04 Upstream changes from Android.
Review URL: https://codereview.chromium.org/12699002

git-svn-id: http://skia.googlecode.com/svn/trunk@8045 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-08 18:35:13 +00:00
reed@google.com
c7d0ea3cd3 add asScalars() to document when we want to treat SkPoint or SkRect as an array
of SkScalars.
Review URL: https://codereview.chromium.org/12530010

git-svn-id: http://skia.googlecode.com/svn/trunk@8041 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-08 16:07:54 +00:00
epoger@google.com
b58772f866 PDF: add support for named destinations.
Landing patchset 7 from https://codereview.appspot.com/7374052 for dml@google.com
Review URL: https://codereview.chromium.org/12533009

git-svn-id: http://skia.googlecode.com/svn/trunk@8034 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-08 09:09:10 +00:00
sugoi@google.com
9c55f801a3 Fixing some warnings on Linux
There were only a few warnings left, so I fixed them and enabled the unused variable warning by removing the "-Wno-unused" flag. Only the -Wno-unused-parameter remains for now (could be removed later).
Review URL: https://codereview.chromium.org/12480002

git-svn-id: http://skia.googlecode.com/svn/trunk@8030 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-07 20:52:59 +00:00
bsalomon@google.com
b9cf393e84 Add missing #include <stdarg.h> to SkString.h (fix Android build)
git-svn-id: http://skia.googlecode.com/svn/trunk@8021 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-07 18:05:08 +00:00
bsalomon@google.com
f910d3b23b Make GrGLEffects use an interface to append their code.
A small step towards encapsulating GrGLShaderBuilder.
Review URL: https://codereview.chromium.org/12547012

git-svn-id: http://skia.googlecode.com/svn/trunk@8018 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-07 17:06:57 +00:00
reed@google.com
8c9737e114 change FontIdentity to explicitly hold ttcIndex and ID, so we can use both in the
IPC version in chrome.



git-svn-id: http://skia.googlecode.com/svn/trunk@8005 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-06 13:06:03 +00:00
skia.committer@gmail.com
64334352cc Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8003 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-06 07:01:46 +00:00
epoger@google.com
812b6f59fa Revert r8000 due to failures on some buildbots
git-svn-id: http://skia.googlecode.com/svn/trunk@8001 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-06 00:47:22 +00:00
epoger@google.com
1cad898916 PDF: add support for named destinations
Imported from https://codereview.appspot.com/7374052/ on behalf of dml@google.com
Review URL: https://codereview.chromium.org/12466008

git-svn-id: http://skia.googlecode.com/svn/trunk@8000 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-06 00:05:13 +00:00
bsalomon@google.com
64cc810ad1 Make SkOSWindow return the sample count and stencil bit count for its GL context.
Review URL: https://codereview.chromium.org/12437010

git-svn-id: http://skia.googlecode.com/svn/trunk@7995 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-05 20:06:05 +00:00
bsalomon@google.com
b7f20f20ac Unify wgl context creation.
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/12455009

git-svn-id: http://skia.googlecode.com/svn/trunk@7990 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-05 19:13:09 +00:00
reed@google.com
a718c5e0e5 add SK_API to more stream subclasses (for shared library use)
git-svn-id: http://skia.googlecode.com/svn/trunk@7986 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-05 17:49:10 +00:00
commit-bot@chromium.org
b24f89353e Added support for non-separable blending modes.
Fixed scalar issue from https://codereview.appspot.com/7346044

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7984 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-05 16:23:59 +00:00
scroggo@google.com
c75764ed44 If Ashmem cache fails pinCache, do not reallocate.
Review URL: https://codereview.chromium.org/12398021

git-svn-id: http://skia.googlecode.com/svn/trunk@7973 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 21:38:50 +00:00
scroggo@google.com
a560d00ba5 Provide an option in bench_pictures to count pixel ram.
In SkLruImageCache, provide an option to keep all pixels, and document
the new behavior.

In gm/factory.cpp, set the budget for the Lru image cache to 1, to
retain (basically) the old behavior.

BUG=https://code.google.com/p/skia/issues/detail?id=1010

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7972 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 21:32:32 +00:00
robertphillips@google.com
37ebe3fbf6 Address some valgrind issues
https://codereview.appspot.com/7448051/



git-svn-id: http://skia.googlecode.com/svn/trunk@7966 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 20:03:44 +00:00
reed@google.com
d66045ec7d export getter for global instance of fontconfiginterfacedirect
git-svn-id: http://skia.googlecode.com/svn/trunk@7963 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 19:07:02 +00:00
reed@google.com
86a44b89c5 export api with SK_API
git-svn-id: http://skia.googlecode.com/svn/trunk@7962 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 17:26:02 +00:00
mike@reedtribe.org
dc09f07671 move some of the impl in fonthost into typeface virtuals
git-svn-id: http://skia.googlecode.com/svn/trunk@7944 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-03 01:15:48 +00:00
jvanverth@google.com
9b855c7c95 Resubmit r7899 and r7901.
git-svn-id: http://skia.googlecode.com/svn/trunk@7929 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-01 18:21:22 +00:00
bsalomon@google.com
ecd84842b3 Add support to GrGLInterface for vertex array objects
Committed: https://code.google.com/p/skia/source/detail?r=7919
Review URL: https://codereview.chromium.org/12379025

git-svn-id: http://skia.googlecode.com/svn/trunk@7924 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-01 15:36:02 +00:00
bsalomon@google.com
b82c3993c2 Revert 7919 and 7920 (committed wrong version of r7919.)
git-svn-id: http://skia.googlecode.com/svn/trunk@7923 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-01 15:32:49 +00:00
bsalomon@google.com
87c6d7a99e Add support to GrGLInterface for vertex array objects
Review URL: https://codereview.chromium.org/12379025

git-svn-id: http://skia.googlecode.com/svn/trunk@7919 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-01 14:37:18 +00:00
skia.committer@gmail.com
631cdcb4a6 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7910 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-01 12:12:55 +00:00
robertphillips@google.com
af3a3b9fb1 Revert r7901 & r7899 to allow DEPS roll
git-svn-id: http://skia.googlecode.com/svn/trunk@7909 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 23:08:28 +00:00
robertphillips@google.com
6177e6999d Split GrGLContextInfo into GrGLContext & GrGLContextInfo
https://codereview.appspot.com/7436045/



git-svn-id: http://skia.googlecode.com/svn/trunk@7905 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 20:16:25 +00:00
bsalomon@google.com
26fb61ae46 Move the default definition of GR_USE_NEW_SHADER_SOURCE_SIGNATURE to GrGLConfig.
R=senorblanco@google.com
Review URL: https://codereview.chromium.org/12390021

git-svn-id: http://skia.googlecode.com/svn/trunk@7904 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 19:26:04 +00:00
commit-bot@chromium.org
aa537d4bdb Make SkTDArray accessors const-friendly.
This change creates const and non-const versions of SkTDArray::begin(), end(), operator[]() and getAt(). This will keep us from inadvertently changing a const SkTDArray, which the previous signatures allowed.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7902 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 19:03:13 +00:00
commit-bot@chromium.org
e452a0ab43 Use updated Khronos signature for glShaderSource
(const char* const instead of char**).

This is needed for new Khronos headers.

BUG=178589

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7900 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 17:11:11 +00:00
jvanverth@google.com
b8b705b1b9 Add new vertex attribute array specification.
This changes the old method of setting vertex layout to a new one where we
specify vertex attribute data separately from attribute bindings (i.e. program
functionality). Attribute data is now set up via an array of generic attribute
types and offsets, and this is mapped to the old program functionality by
setting specific attribute indices. This allows us to create more general 
inputs to shaders.


git-svn-id: http://skia.googlecode.com/svn/trunk@7899 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 16:28:34 +00:00
edisonn@google.com
5bd26d32ab revert r7892
git-svn-id: http://skia.googlecode.com/svn/trunk@7896 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 14:01:44 +00:00
edisonn@google.com
194b7cdb50 resubmit after fixing assert issue: https://codereview.appspot.com/6744050
git-svn-id: http://skia.googlecode.com/svn/trunk@7892 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 19:45:11 +00:00
bsalomon@google.com
ff436617d8 Sort GL extension strings and search to find.
Review URL: https://codereview.chromium.org/12316141

git-svn-id: http://skia.googlecode.com/svn/trunk@7889 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 19:07:32 +00:00
reed@google.com
f71a2335f9 use fontconfig fonthost for skia (in prep for using in chrome)
Review URL: https://codereview.chromium.org/12319150

git-svn-id: http://skia.googlecode.com/svn/trunk@7887 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 19:06:30 +00:00
junov@chromium.org
29b19e53cf Change SkTileGride geometry calculations to match the Chromium compositor.
This patch changes the semantics of tileWidth/Height to include the border region, and
uses an offset to take into account the fact that there is no outer border for outer
tiles. This patch also fixes a previous bug where the right column and bottom row were
considered to be included in bounds that are expressed as an SkIRect.

Companion Chromium CL required for roll: https://codereview.chromium.org/12221077/

TEST=TileGrid unit test
Review URL: https://codereview.appspot.com/7350050

git-svn-id: http://skia.googlecode.com/svn/trunk@7885 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 18:35:16 +00:00
edisonn@google.com
d1c53aae59 Revert r7883
git-svn-id: http://skia.googlecode.com/svn/trunk@7884 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 17:46:09 +00:00
edisonn@google.com
676aef05ab Use SkSet to fix issue when pdf generates an exp number of resources.
The problem fixed - http://code.google.com/p/skia/issues/detail?id=940 - is that getResources will recursively obtain all child resource recursively without checking for duplicates.

If we have lots of duplicates, then we try to build a very large vector (exponential with the number of nodes usually) and sooner or later we end up using too much memory and crash.

A possible solution could have been to make sure resources do not have duplicates, but that requirement is impractical, and it this leaves the solution fragile, if there is any issue in the tree,  we crash.

When we emit the pdf, the large number of duplicates is not an issue, because SkPDFCatalog::addObject will deal with duplicates.

I have run the gm with --config pdf, and the images are 100% same bits, while the pdfs have the same size but some very small changes, the order of some objects.
Review URL: https://codereview.appspot.com/6744050

git-svn-id: http://skia.googlecode.com/svn/trunk@7883 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 16:54:44 +00:00
skia.committer@gmail.com
12eea2b10d Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7875 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 07:10:10 +00:00
bsalomon@google.com
1744f97ea7 Use glGetStringi to get extensions when available.
Review URL: https://codereview.chromium.org/12328111

git-svn-id: http://skia.googlecode.com/svn/trunk@7872 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-26 21:46:32 +00:00
bsalomon@google.com
f47dd74da3 Rename template param to SkSTArray to be consistent with its base class, SkTArray.
R=jvanverth@google.com
Review URL: https://codereview.appspot.com/7372050

git-svn-id: http://skia.googlecode.com/svn/trunk@7862 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-26 15:40:01 +00:00
reed@google.com
80f5465083 git-svn-id: http://skia.googlecode.com/svn/trunk@7856 2bbb7eff-a529-9590-31e7-b0007b416f81 2013-02-25 22:19:20 +00:00
scroggo@google.com
e5f48243bd Fix a bunch of warnings, mainly around rowBytes.
My recent change changed the way SkBitmap::fRowBytes is stored,
and parameter/return values referring to rowBytes were changed
to type size_t. Change the storage back, and eliminate warnings
resulting from returning a size_t.

Review URL: https://codereview.appspot.com/7396059

git-svn-id: http://skia.googlecode.com/svn/trunk@7855 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-25 21:47:41 +00:00
reed@google.com
d71fe99fe4 check-point: skiafy SkFontHost_fontconfig from chrome
git-svn-id: http://skia.googlecode.com/svn/trunk@7852 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-25 20:38:07 +00:00
bsalomon@google.com
6e4e65066a Give GrDrawTarget a back ptr to its owning GrContext.
Review URL: https://codereview.appspot.com/7395055

git-svn-id: http://skia.googlecode.com/svn/trunk@7850 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-25 20:12:45 +00:00
scroggo@google.com
0ba4bf427a Use size_t for rowBytes.
Previously, we were using uint32_t sometimes, int sometimes, and
size_t sometimes. Switch to using size_t, since we are actually
talking about a number of bytes.

In copyPixelsTo, use 0 as a flag to use the internal rowBytes,
which is more consistent with setConfig.

Review URL: https://codereview.appspot.com/7370047

git-svn-id: http://skia.googlecode.com/svn/trunk@7843 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-25 16:02:36 +00:00
skia.committer@gmail.com
58433de862 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7839 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-23 07:02:45 +00:00
scroggo@google.com
32ef131f52 Remove SkSerializationHelpers.
Move the function definition for EncodeBitmap to SkPicture,
where InstallPixelRefProc has already moved (and where it is
relevant).

Review URL: https://codereview.appspot.com/7386053

git-svn-id: http://skia.googlecode.com/svn/trunk@7837 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-22 22:04:19 +00:00
scroggo@google.com
f8d7d27313 Create SkLazyPixelRef which performs lazy decoding.
The new pixel ref behaves similarly to SkImageRef, with some key differences:
It does not depend on the images project.
It requires an SkImageCache, which handles allocation and caching of the pixel
memory.
It takes a function signature for decoding which decodes into already allocated
pixel memory rather than into an SkBitmap.

Add two implementations of SkImageCache: SkLruImageCache and SkAshmemImageCache.

Replace SkSerializationHelpers::DecodeBitmap with SkPicture::InstallPixelRefProc,
and update sites that referenced it.

SkBitmapFactory now sets the pixel ref to a new object of the new
class SkLazyPixelRef, provided it has an SkImageCache for caching.

Provide an option to do lazy decodes in render_pictures and bench_pictures.

SkPicture:
Eliminate the default parameters in the constructor.
If a proc for decoding bitmaps is installed, use it to decode any encoded
data in subpictures.
When parsing deserializing subpictures, check for success.
When serializing subpictures, pass the picture's bitmap encoder to the
subpicture's call to serialize.

Update BitmapFactoryTest to test its new behavior.

BUG=https://code.google.com/p/skia/issues/detail?id=1008
BUG=https://code.google.com/p/skia/issues/detail?id=1009

Review URL: https://codereview.appspot.com/7060052

git-svn-id: http://skia.googlecode.com/svn/trunk@7835 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-22 21:38:35 +00:00
bsalomon@google.com
cb26535ff7 Make GPU versions of benchs use the same canvas size as raster.
Review URL: https://codereview.appspot.com/7400049

git-svn-id: http://skia.googlecode.com/svn/trunk@7827 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-22 16:13:16 +00:00
sugoi@google.com
4b6d432f1e Small adjustments to SkRectShaderImageFilter to follow up on original cl.
Review URL: https://codereview.appspot.com/7377049

git-svn-id: http://skia.googlecode.com/svn/trunk@7816 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-21 20:26:50 +00:00
bsalomon@google.com
96966a5a1f Use CPU arrays for dynamic indices/vertices on ARM GPUs.
Review URL: https://codereview.appspot.com/7365047

git-svn-id: http://skia.googlecode.com/svn/trunk@7810 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-21 16:34:21 +00:00
sugoi@google.com
a1c511b870 New SkRectShaderImageFilter image filter
This new changelist also introduces a new image filter called SkRectShaderImageFilter which is make to simply apply a shader on a region without using any inputs.

TEST=Added ShaderImageFilter test
Review URL: https://codereview.appspot.com/7300046

git-svn-id: http://skia.googlecode.com/svn/trunk@7808 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-21 15:02:28 +00:00
skia.committer@gmail.com
76bf70d38f Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7787 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-20 07:02:30 +00:00
mike@reedtribe.org
baaf8c53ca add as experiment to factor out low-level enums and types
git-svn-id: http://skia.googlecode.com/svn/trunk@7786 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-20 02:49:16 +00:00
skia.committer@gmail.com
044679ef8c Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7746 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-15 07:16:57 +00:00
humper@google.com
5d0a7692da debug dump functions for mathematica visualization
BUG=

Review URL: https://codereview.appspot.com/7322078

git-svn-id: http://skia.googlecode.com/svn/trunk@7743 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-14 18:57:59 +00:00
humper@google.com
cfb7b91b57 print a useful message when assert fails on the mac
BUG=

Review URL: https://codereview.appspot.com/7314100

git-svn-id: http://skia.googlecode.com/svn/trunk@7742 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-14 18:56:22 +00:00
bsalomon@google.com
682e1f9245 Use CGL rather than AGL on the Mac.
Review URL: https://codereview.appspot.com/7307106

git-svn-id: http://skia.googlecode.com/svn/trunk@7736 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-14 15:10:59 +00:00
robertphillips@google.com
791f12e6cf Move SkPaint::toString from debugger to SkPaint
https://codereview.appspot.com/7314092/



git-svn-id: http://skia.googlecode.com/svn/trunk@7732 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-14 13:53:53 +00:00
bsalomon@google.com
73a9694b4c Use SkMWRandom in GLPrograms test.
R=jvanverth@google.com
Review URL: https://codereview.appspot.com/7306097

git-svn-id: http://skia.googlecode.com/svn/trunk@7721 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-13 16:31:19 +00:00
edisonn@google.com
2ae67e70cd add custom implementation for drawBitmapRect to shield from changes in SkDevice
git-svn-id: http://skia.googlecode.com/svn/trunk@7696 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-12 01:06:38 +00:00
junov@chromium.org
8d84b8f420 Adding comments based on review https://codereview.appspot.com/7300072/
git-svn-id: http://skia.googlecode.com/svn/trunk@7686 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-08 21:56:16 +00:00
bsalomon@google.com
994b52ea55 Correct default value for GR_STATIC_RECT_VB
git-svn-id: http://skia.googlecode.com/svn/trunk@7685 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-08 21:45:47 +00:00
bsalomon@google.com
6438695222 Revert 7625 until after M26 due to a mix of perf changes.
git-svn-id: http://skia.googlecode.com/svn/trunk@7683 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-08 21:22:44 +00:00
junov@chromium.org
f507c410e3 Adding option to SkTileGrid for specifying border pixels.
The purpose of this patch is to make it possible for the chromium compositor to
generate a TileGrid structure that is better suited for scaled playback.
Review URL: https://codereview.appspot.com/7300072

git-svn-id: http://skia.googlecode.com/svn/trunk@7680 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-08 21:03:30 +00:00
bsalomon@google.com
85983288ba Remove compile time option to use different types for text vertices.
Review URL: https://codereview.appspot.com/7309060

git-svn-id: http://skia.googlecode.com/svn/trunk@7658 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 22:00:29 +00:00
bsalomon@google.com
82b0ec6ea4 Remove GR_DISABLE_DRAW_BUFFERING, replace with RTConf variable.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7312061

git-svn-id: http://skia.googlecode.com/svn/trunk@7656 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 21:02:36 +00:00
robertphillips@google.com
5990397d08 Address google3 compiler warning
https://codereview.appspot.com/7308063/



git-svn-id: http://skia.googlecode.com/svn/trunk@7655 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 21:02:23 +00:00
bsalomon@google.com
5b25a8d72d Remove GR_DUMP_TEXTURE_UPLOADS
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7300062

git-svn-id: http://skia.googlecode.com/svn/trunk@7652 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 20:21:39 +00:00
bsalomon@google.com
51ac7e6d97 Remove GR_AGGRESSIVE_SHADER_OPTS build option.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7312058

git-svn-id: http://skia.googlecode.com/svn/trunk@7650 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 19:53:49 +00:00
bsalomon@google.com
753a362cfc Use SkBits2Float in SkRandom
https://codereview.appspot.com/7266044/



git-svn-id: http://skia.googlecode.com/svn/trunk@7648 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 19:52:30 +00:00
robertphillips@google.com
fe1b536bb7 Enhance GL error checking for non-Ganesh GL calls
https://codereview.appspot.com/7312057/



git-svn-id: http://skia.googlecode.com/svn/trunk@7647 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 19:45:46 +00:00
djsollen@google.com
efbe8e9bed Fix errors when compiling with -Wall -Werror on Android.
This CL also turns those features on by default on Android

Review URL: https://codereview.appspot.com/7313049

git-svn-id: http://skia.googlecode.com/svn/trunk@7645 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 18:58:35 +00:00
bsalomon@google.com
fec0bc3fc1 Remove legacy names no longer referenced in Chrome and WebKit.
Review URL: https://codereview.appspot.com/7311055

git-svn-id: http://skia.googlecode.com/svn/trunk@7640 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 14:43:04 +00:00
bsalomon@google.com
1c7c01a1b3 Remove GR_STATIC_RECT_VB
Review URL: https://codereview.appspot.com/7304055

git-svn-id: http://skia.googlecode.com/svn/trunk@7625 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-06 18:53:12 +00:00
bsalomon@google.com
9c68058b67 Fix WritePixels test on ANGLE.
Don't upload BGRA to RGBA if not supported (ES2 w/ EXT BGRA extension).

R=senorblanco@chromium.org
Review URL: https://codereview.appspot.com/7305046

git-svn-id: http://skia.googlecode.com/svn/trunk@7622 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-06 18:17:50 +00:00
reed@google.com
3fda0eadac check for self-assignment in operator=
git-svn-id: http://skia.googlecode.com/svn/trunk@7610 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-06 12:47:14 +00:00
mike@reedtribe.org
53f3f31e17 tweak to spacing, to trigger build
git-svn-id: http://skia.googlecode.com/svn/trunk@7607 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-06 03:43:57 +00:00
senorblanco@chromium.org
3cb406bb88 Implement support for origin-TopLeft render targets. Note that the default behaviour remains the same: textures default to origin-TopLeft, render targets default to origin-BottomLeft, and backend textures default to origin-BottomLeft. However, the caller can override the default by setting fOrigin in GrTextureDesc, GrBackendTextureDesc or GrBackendRenderTargetDesc.
Review URL: https://codereview.appspot.com/7230049

git-svn-id: http://skia.googlecode.com/svn/trunk@7594 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 19:50:46 +00:00
robertphillips@google.com
cf9faf6ce9 Reverting r7545 (render target origin change) due to layout test issues (see https://codereview.chromium.org/12210002/)
git-svn-id: http://skia.googlecode.com/svn/trunk@7571 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 14:05:06 +00:00
senorblanco@chromium.org
377c14a1e6 Nuke SkSingleInputImageFilter. 99% of its functionality was refactored into SkImageFilterUtils in https://code.google.com/p/skia/source/detail?r=7467, so it has outlived its usefulness.
Review URL: https://codereview.appspot.com/7277055

git-svn-id: http://skia.googlecode.com/svn/trunk@7563 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 22:57:21 +00:00
reed@google.com
3d5b998bd7 use SkToS32 to turn a ptrdiff_t into an int (on 64bit build)
git-svn-id: http://skia.googlecode.com/svn/trunk@7562 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 22:40:28 +00:00
reed@google.com
25cfa69342 land https://codereview.appspot.com/7221086/ -- add Multiply xfermode matching CSS spec
git-svn-id: http://skia.googlecode.com/svn/trunk@7553 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 20:06:00 +00:00
senorblanco@chromium.org
ed8659b51d Implement support for origin-TopLeft render targets in GL backend.
Review URL: https://codereview.appspot.com/7230049

git-svn-id: http://skia.googlecode.com/svn/trunk@7545 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 17:29:51 +00:00
bsalomon@google.com
67b915de99 Make GPU unit tests use GrContexts of different GL types.
Review URL: https://codereview.appspot.com/7281046

git-svn-id: http://skia.googlecode.com/svn/trunk@7540 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 16:13:32 +00:00
bungeman@google.com
7de18e5c7b Add sk_ignore_unused_variable to avoid warnings.
https://codereview.appspot.com/7218045/


git-svn-id: http://skia.googlecode.com/svn/trunk@7539 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 15:58:08 +00:00
mike@reedtribe.org
aac2fb8019 move kStyleCount out of Style enum, and into its own, to avoid
1. someone passing kStyleCount as a parameter
2. warnings about not handling all enum values in a switch

We should probably move to remove kCountFoo from all of our enums for these reasons.



git-svn-id: http://skia.googlecode.com/svn/trunk@7532 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 05:17:10 +00:00
reed@google.com
408586e2a6 remove the kMultiply_Mode alias for kModulate_Mode. We plan to re-target kMultiply_Mode
in the future, to match the CSS spec.



git-svn-id: http://skia.googlecode.com/svn/trunk@7518 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-01 16:44:50 +00:00
djsollen@google.com
d9b0f480be Only support SkPicture abort for Android due to the fragility of the existing API
Review URL: https://codereview.appspot.com/7225083

git-svn-id: http://skia.googlecode.com/svn/trunk@7515 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-01 16:18:09 +00:00
djsollen@google.com
528a556514 Fix android errors when unflattening an SkImageRef_ashmem object.
Review URL: https://codereview.appspot.com/7228071

git-svn-id: http://skia.googlecode.com/svn/trunk@7514 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-01 15:57:13 +00:00
reed@google.com
ba3a3c93b2 revert name changes to SkBlendImageFilter. It (correctly) named its enum kMultiply_Mode,
and handled that itself internally, rather than calling SkXfermode. This CL removes
the kModulate_Mode alias from its list.



git-svn-id: http://skia.googlecode.com/svn/trunk@7509 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-01 14:35:09 +00:00
skia.committer@gmail.com
24d5ee4f88 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7484 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-31 07:06:15 +00:00
robertphillips@google.com
6cfe1fba33 Adding kMultiply_Mode (as an alias to kModulate_Mode) in SkBlendImageFilter.h to get Chrome compiling
git-svn-id: http://skia.googlecode.com/svn/trunk@7482 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-31 01:47:58 +00:00
robertphillips@google.com
e7c843d2e5 Readding kMultiply_Mode (as an alias to kModulate_Mode) in SkXfermode.h to get Chrome to compile
git-svn-id: http://skia.googlecode.com/svn/trunk@7480 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-31 01:23:39 +00:00
reed@google.com
8d3cd7a170 clone of https://codereview.appspot.com/7208043/
Review URL: https://codereview.appspot.com/7232062

git-svn-id: http://skia.googlecode.com/svn/trunk@7476 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-30 21:36:11 +00:00
senorblanco@chromium.org
c2594f4106 This changes the signature of SkImageFilter::filterImageGPU() to use SkBitmaps for input and output, and removes the rect param. This allows us to return textures which are larger than the actual result, such as when GrAutoScratchTextures are used. The SkBitmap's size represents the active region, while the GrTexture's size is the full texture size.
This fixes the bicubic image filter GM on the GPU, which otherwise draws garbage outside the filtered region.  It also moves us closer to unifying the signatures of SkImageFilter::onFilterImage() and SkImageFilter::filterImageGPU().

Review URL: https://codereview.appspot.com/7180048

git-svn-id: http://skia.googlecode.com/svn/trunk@7467 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-30 19:08:47 +00:00
jvanverth@google.com
a8e66f76d9 Adds SkMWCRandom, which generates random numbers using a variant of George Marsaglia's multiply-with-carry "mother-of-all" method. This passes the tuftests suite so it should be much better than the current method (which does not).
https://codereview.appspot.com/7235056/


git-svn-id: http://skia.googlecode.com/svn/trunk@7463 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-30 15:42:19 +00:00
reed@google.com
8c0bc9b712 add SK_API to SkMutex (for chrome)
git-svn-id: http://skia.googlecode.com/svn/trunk@7443 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-29 13:03:36 +00:00
skia.committer@gmail.com
cdcb2ce274 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7439 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-29 07:05:52 +00:00
reed@google.com
24d10cb635 tweak to comments, ws change to trigger bots
git-svn-id: http://skia.googlecode.com/svn/trunk@7435 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 22:36:34 +00:00
reed@google.com
75847199c2 fix build
Review URL: https://codereview.appspot.com/7229052

git-svn-id: http://skia.googlecode.com/svn/trunk@7426 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 20:53:22 +00:00
robertphillips@google.com
4991b8f234 Added toString to SkDrawLooper-derived classes
https://codereview.appspot.com/7195054/



git-svn-id: http://skia.googlecode.com/svn/trunk@7422 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 20:21:59 +00:00
senorblanco@chromium.org
22943cd588 Fix debug build. Unreviewed.
git-svn-id: http://skia.googlecode.com/svn/trunk@7416 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 16:48:51 +00:00
senorblanco@chromium.org
ef5dbe1cd9 Add an origin flag for backend (external) textures. Some textures in WebKit have a topdown orientation, and skia needs to be notified of this, so that they are not drawn upside-down.
Review URL: https://codereview.appspot.com/7200048

git-svn-id: http://skia.googlecode.com/svn/trunk@7414 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 16:42:38 +00:00
bsalomon@google.com
adc6536fe5 Remove getter of writable GrEffectStage from GrDrawState.
Upcoming changes will require GrDrawState to know things about the set of installed effects. Thus all setting of effects must go through a GrDrawState function (setEffect()). This change accomplishes that.
Review URL: https://codereview.appspot.com/7214045

git-svn-id: http://skia.googlecode.com/svn/trunk@7411 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 14:26:09 +00:00
skia.committer@gmail.com
e16efc1882 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-26 07:06:02 +00:00
bsalomon@google.com
6d5d08f14f Fix nextRangeU(0, MAX_UINT) div by zero.
R=reed@google.com
Review URL: https://codereview.appspot.com/7201058

git-svn-id: http://skia.googlecode.com/svn/trunk@7400 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-25 19:19:20 +00:00