Commit Graph

718 Commits

Author SHA1 Message Date
vandebo@chromium.org
c48b2b330f Cleanup SkPDFTypfaceInfo and make it more generic.
Renamed to SkAdvancedTypefaceMetrics.
Include Em size and return all metrics in unscaled font units.
Make retrieval of advances optional.
Reorder SkAdvancedTypefaceMetrics to be somewhat logical.
Change the types of fields in SkAdvancedTypefaceMetrics to their minimum required size.

Review URL: http://codereview.appspot.com/4121049

git-svn-id: http://skia.googlecode.com/svn/trunk@752 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-02 02:11:22 +00:00
bsalomon@google.com
0748f217ba Attempt to simplify NPOT texture caps. Also fixes case where textures would unnecessarily be bloated to POT. Adds setting of sampler's filter setting in paint conversion.
git-svn-id: http://skia.googlecode.com/svn/trunk@751 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-01 22:56:16 +00:00
vandebo@chromium.org
f7c157610f [PDF] Clean up ref counting.
Return ref'd objs where possible enabling removal of many SkRefPtr<> variables.

Review URL: http://codereview.appspot.com/4029051

git-svn-id: http://skia.googlecode.com/svn/trunk@750 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-01 22:19:44 +00:00
bsalomon@google.com
6f7fbc9fbb Adds ability to draw rects using a unit square vertex buffer. Useful when matrix/uniform changes are less expensive than sending new verts.
Adds optional matrix parameters to GrContext drawRect and drawRectToRect so that non-axis-aligned matrices can be drawn using these functions.

codereview Issue 4105049

git-svn-id: http://skia.googlecode.com/svn/trunk@749 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-01 19:12:40 +00:00
vandebo@chromium.org
fb697e7a37 [PDF] Fix bugs preventing gm from running with PDF support.
Fix copy-paste ref counting bug.
Change NOT_IMPLEMENTED macro to only assert in debug mode.

Review URL: http://codereview.appspot.com/4080048

git-svn-id: http://skia.googlecode.com/svn/trunk@748 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-01 01:04:00 +00:00
vandebo@chromium.org
1cfa2c4586 [PDF] Support image alpha channel plus a couple small fixes.
Fix bug in rendering paths with cubic segments.
Only compress data if the compressed size is smaller than the uncompressed size.

Review URL: http://codereview.appspot.com/4079048

git-svn-id: http://skia.googlecode.com/svn/trunk@747 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-31 19:35:43 +00:00
reed@google.com
5f6ee1a807 initialize int var-args to placate chrome's runtime check
git-svn-id: http://skia.googlecode.com/svn/trunk@746 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-31 14:24:48 +00:00
vandebo@chromium.org
befebb8a84 [PDF] Honor srcRect in drawBitmap.
Review URL: http://codereview.appspot.com/4083045

git-svn-id: http://skia.googlecode.com/svn/trunk@745 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-29 01:38:50 +00:00
reed@google.com
9d0d195ca4 update dox on bitmap configs
document testing build-flag for large bitmaps



git-svn-id: http://skia.googlecode.com/svn/trunk@744 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-28 22:19:22 +00:00
vandebo@chromium.org
16be6b8fdf [PDF] Add replacement implementations for functions missing in older freetype libs.
Review URL: http://codereview.appspot.com/4043044

git-svn-id: http://skia.googlecode.com/svn/trunk@743 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-28 21:28:56 +00:00
reed@google.com
02a7e6c117 fix slow performance on desktops by uping our max-texture-dim from 512 to
whatever the gpu itself broadcasts.



git-svn-id: http://skia.googlecode.com/svn/trunk@742 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-28 21:21:49 +00:00
reed@google.com
d2938db1d9 replace UINT32_MAX with portable macro
git-svn-id: http://skia.googlecode.com/svn/trunk@741 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-28 20:54:15 +00:00
reed@google.com
618ef5ee3b conditionalize impl on SK_SUPPORT_PDF, to help chrome build
git-svn-id: http://skia.googlecode.com/svn/trunk@740 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 22:10:41 +00:00
vandebo@chromium.org
8af0b36165 Fix windows build.
Review URL: http://codereview.appspot.com/3996048

git-svn-id: http://skia.googlecode.com/svn/trunk@739 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 21:59:00 +00:00
reed@google.com
dea520fc93 move into core for now, so we can build SkFontHost_FreeType.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@738 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 20:32:23 +00:00
reed@google.com
e42e8452aa work around framebuffer_blit confusion on linux -- better fix on the way
git-svn-id: http://skia.googlecode.com/svn/trunk@737 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 17:20:51 +00:00
reed@google.com
9341bb6f46 fix linux gpu build (don't need egl.h)
-This line, and those below, will be ignored--

M    trunk/gpu/include/GrGLConfig.h


git-svn-id: http://skia.googlecode.com/svn/trunk@736 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 17:11:51 +00:00
reed@google.com
851927db20 remove debugging code around gUseExt
git-svn-id: http://skia.googlecode.com/svn/trunk@735 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 15:18:33 +00:00
reed@google.com
8752ad7b2d close quotes on #error
git-svn-id: http://skia.googlecode.com/svn/trunk@734 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 04:55:57 +00:00
reed@google.com
c93a17f2df fix mac build (don't need typedef struct foo foo)
git-svn-id: http://skia.googlecode.com/svn/trunk@733 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 04:37:53 +00:00
reed@google.com
386900790b fix warnings, including using GrTCast<> to go from &Obj -> uint32_t*
git-svn-id: http://skia.googlecode.com/svn/trunk@732 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 01:44:18 +00:00
reed@google.com
3636ed558f embed a refdict inside SkDevice
udate unittests to test refdict's destructor



git-svn-id: http://skia.googlecode.com/svn/trunk@731 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 23:50:57 +00:00
reed@google.com
0e190d0e12 add refdict class, for holding a dictionary of reference-counted objects
-- experimental



git-svn-id: http://skia.googlecode.com/svn/trunk@730 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 23:36:05 +00:00
vandebo@chromium.org
02cc5aa736 Update SkPDFDevice::drawPath signature to match SkDevice.
Review URL: http://codereview.appspot.com/4068044

git-svn-id: http://skia.googlecode.com/svn/trunk@729 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 22:06:29 +00:00
vandebo@chromium.org
2a22e10ab2 Add Truetype and Type 1 font embedding support
Sorry this is such a large CL.  It was very exploratory for me to make this
work.

- Add an interface to SkFontHost to retrieve font information and provide NULL implementations on all platforms except Linux.
- Segment large Type 1 fonts into fonts with shared resources with 255 glyphs each.
- Convert the various Type 1 formats to the form PDF wants.
- Update font as we draw text instead of as part of the graphical state.
- Remove built-in font support, we can't really use it.

Other changes I can pull out to a separate CL if you like.

- Add SkTScopedPtr class.
- Fix double free of resources.
- Fix bug in resource unique-ifying code.
- Don't print anything for any empty clip path.
- Fix copy paste error - MiterLimit.
- Fix sign extension bug in SkPDFString
- Fix FlateTest rename that was missed on a previous commit.

Review URL: http://codereview.appspot.com/4082042

git-svn-id: http://skia.googlecode.com/svn/trunk@728 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 21:01:34 +00:00
reed@google.com
c921843d85 fixes for some warnings:
- #if of something that was not defined
- explicit constructor call for baseclass in copy-constructor of subclass

http://code.google.com/p/skia/issues/detail?id=112



git-svn-id: http://skia.googlecode.com/svn/trunk@727 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 19:05:12 +00:00
bsalomon@google.com
759b0363da Add SampleShaderText to vs project.
git-svn-id: http://skia.googlecode.com/svn/trunk@726 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 18:43:06 +00:00
bsalomon@google.com
0fdaa22dea Add shaded text sample and gm test.
git-svn-id: http://skia.googlecode.com/svn/trunk@725 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 18:35:26 +00:00
reed@google.com
664a843e8b chrome always assumes BGRA for its textures
git-svn-id: http://skia.googlecode.com/svn/trunk@724 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 15:24:55 +00:00
reed@google.com
37a3133d20 fix comments for U8CPU and S16CPU
http://code.google.com/p/skia/issues/detail?id=113



git-svn-id: http://skia.googlecode.com/svn/trunk@723 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 14:55:42 +00:00
bsalomon@google.com
596189a049 Add GrGpuGLShaders2 to gr_files.mk
git-svn-id: http://skia.googlecode.com/svn/trunk@722 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-24 18:19:55 +00:00
bsalomon@google.com
7d34d2eecc Increase number of stages from 1 to 2
Move GrTextContext from stage 0 to stage 1 so it doesn't conflict with GrPaint (allow textured text)
Switch to dynamically generated shaders



git-svn-id: http://skia.googlecode.com/svn/trunk@721 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-24 17:41:47 +00:00
reed@google.com
1a2e8d233d make xfermode warning printf be debug-only
git-svn-id: http://skia.googlecode.com/svn/trunk@720 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-21 22:08:29 +00:00
reed@google.com
324f1bb181 fix release build
git-svn-id: http://skia.googlecode.com/svn/trunk@719 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-21 22:04:38 +00:00
bsalomon@google.com
5782d712ff Rev the GrContext interface. Context has draw* functions that take a new GrPaint object. Removed many of the lower-level GrGpu function call-throughs on context.
Remove unused/unsupported point size (we don't draw non-hairline points using GL points).
Change current* getter functions to get* for consistency.
Fix bounds when drawing inverse-filled paths.


git-svn-id: http://skia.googlecode.com/svn/trunk@718 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-21 21:03:59 +00:00
bsalomon@google.com
70915f0210 In GrMatrix's setScale, setSkew, & setTranslate check whether the values passed in make the matrix identity before setting the typemask.
git-svn-id: http://skia.googlecode.com/svn/trunk@717 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-20 14:13:13 +00:00
reed@google.com
3d8de049f5 replace GR_GL(GetIntegerv with GR_GL_GetIntegerv to ensure that we zero-init
the var-arg (needed for chrome)



git-svn-id: http://skia.googlecode.com/svn/trunk@716 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-20 02:18:00 +00:00
reed@google.com
bf858b7ef0 update chrome-specific glconfig (should make versions of this for mac/win/linux)
git-svn-id: http://skia.googlecode.com/svn/trunk@715 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 19:04:04 +00:00
reed@google.com
ba8efc8447 add experimental custom GL header for chrome
git-svn-id: http://skia.googlecode.com/svn/trunk@714 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 17:35:08 +00:00
bsalomon@google.com
42ab7ea76e Cleanup including of GL headers and provide way to include custom headers, extension getter.
git-svn-id: http://skia.googlecode.com/svn/trunk@713 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 17:19:40 +00:00
reed@google.com
e49d571175 fix fEntryCount when we purge a cache entry (bug caught by our validate())
git-svn-id: http://skia.googlecode.com/svn/trunk@712 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 14:30:26 +00:00
reed@google.com
117cc39f63 document new (temporary) build flags
git-svn-id: http://skia.googlecode.com/svn/trunk@711 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 13:19:27 +00:00
reed@google.com
f44aa376f0 add compile flag GR_SKIP_2POINTRADIAL_PROGRAMS to ignore the 2point-radial
shader programs (for now), which have problematic on some GPUs



git-svn-id: http://skia.googlecode.com/svn/trunk@710 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 13:15:36 +00:00
reed@google.com
01804b44f9 add getter/setter for TextureCache, so that clients can make their budget
decisions at runtime or per-context, rather than just at compile-time. Leaving
in the default values as is.



git-svn-id: http://skia.googlecode.com/svn/trunk@709 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 21:50:41 +00:00
reed@google.com
63100f9e36 add GR_BUILD_CHROME for now. hopefully we can replace it with other,
non-chrome-specific refactoring to accomodate those differences.



git-svn-id: http://skia.googlecode.com/svn/trunk@708 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 21:32:14 +00:00
reed@google.com
d4dfd10bb6 add new 2nd argument for rendertarget to SkGpuCanvas
git-svn-id: http://skia.googlecode.com/svn/trunk@707 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 21:05:42 +00:00
bsalomon@google.com
2e7b43d33c Remove notion of default rendertarget. This doesn't map well to usage patterns outside sample app. Make binding between SkGpuDevice and a GrRenderTarget more explicit. Create method on GrContext to wrap the current target in the 3D API with a GrRenderTarget.
git-svn-id: http://skia.googlecode.com/svn/trunk@706 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 20:57:22 +00:00
reed@google.com
44b2c73ca6 detect empty/inverted rect before using autobounds helper (as with prev. rev.)
git-svn-id: http://skia.googlecode.com/svn/trunk@705 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 20:55:57 +00:00
reed@google.com
abf15c189b don't use SkAutoPathBoundsUpdate until after we've checked for degenerate
dimensions, otherwise we might set the bounds, only to then abort and not
set any points.

Fixes assert if you call addRoundRect(r, 10, 10) when r is inverted
(i.e. r.fLeft > r.fRight)



git-svn-id: http://skia.googlecode.com/svn/trunk@704 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 20:35:51 +00:00
bsalomon@google.com
3f3ffd6ad9 Fix stencil format array.
git-svn-id: http://skia.googlecode.com/svn/trunk@703 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 17:14:52 +00:00