Commit Graph

1890 Commits

Author SHA1 Message Date
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