I have manually examined all of these diffs and restored a few files that
seem to require manual adjustment.
The following files still need to be modified manually, in a separate CL:
android_sample/SampleApp/AndroidManifest.xml
android_sample/SampleApp/res/layout/layout.xml
android_sample/SampleApp/res/menu/sample.xml
android_sample/SampleApp/res/values/strings.xml
android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java
android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java
experimental/CiCarbonSampleMain.c
experimental/CocoaDebugger/main.m
experimental/FileReaderApp/main.m
experimental/SimpleCocoaApp/main.m
experimental/iOSSampleApp/Shared/SkAlertPrompt.h
experimental/iOSSampleApp/Shared/SkAlertPrompt.m
experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig
gpu/src/android/GrGLDefaultInterface_android.cpp
gyp/common.gypi
gyp_skia
include/ports/SkHarfBuzzFont.h
include/views/SkOSWindow_wxwidgets.h
make.bat
make.py
src/opts/memset.arm.S
src/opts/memset16_neon.S
src/opts/memset32_neon.S
src/opts/opts_check_arm.cpp
src/ports/SkDebug_brew.cpp
src/ports/SkMemory_brew.cpp
src/ports/SkOSFile_brew.cpp
src/ports/SkXMLParser_empty.cpp
src/utils/ios/SkImageDecoder_iOS.mm
src/utils/ios/SkOSFile_iOS.mm
src/utils/ios/SkStream_NSData.mm
tests/FillPathTest.cpp
Review URL: http://codereview.appspot.com/4816058
git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
skdiff --chromium-release baseDir outputDir
skdiff --chromium-debug baseDir outputDir
where baseDir is typically ../chromium/src.
Handles Chromium/WebKit layout tests: recursively traverses the
layout-test-results directory and compares -expected and -actual PNGs,
building a webpage showing the two images, their difference image,
and statistics, sorted by % of pixels difference. Respects all the
standard skdiff flags.
Also changes command line options named with words from starting with
a single hyphen to starting with two, falling in line with standards:
--threshold, --sortbymismatch, etc.
git-svn-id: http://skia.googlecode.com/svn/trunk@1856 2bbb7eff-a529-9590-31e7-b0007b416f81
Conditionally #defines SK_RESTRICT to be __restrict on Win32;
this successfully compiles in VS2008.
git-svn-id: http://skia.googlecode.com/svn/trunk@1841 2bbb7eff-a529-9590-31e7-b0007b416f81
This means we have to be even more cautious about when we call lock, and we should
always check getTexture() first if we can handle a texture directly, rather than
forcing the read-back to get the bits.
git-svn-id: http://skia.googlecode.com/svn/trunk@1815 2bbb7eff-a529-9590-31e7-b0007b416f81
We could speed-up again if we...
- respected kDither and only built 1/2 of the table for non-dither requests
- output simple params to the gpu rather than always a texture
- detected that we have no alpha, and then can skip premul per-entry
git-svn-id: http://skia.googlecode.com/svn/trunk@1772 2bbb7eff-a529-9590-31e7-b0007b416f81
Volatility is a hint that indicates that the contents of a bitmap
are ephemeral. SkGpuDevice will not preserve volatile bitmaps
in its texture cache, and will use textures from a pool of
keyless (recyclable) textures to avoid the performance hit of
texture allocation and release.
A subsequent change is required in webkit in order to take advantage
of this optimization. putImageData, and other methods that create
temporary bitmaps will have to mark their bitmaps as volatile.
before rendering them through skia.
git-svn-id: http://skia.googlecode.com/svn/trunk@1769 2bbb7eff-a529-9590-31e7-b0007b416f81
better match the fonts produced by CoreText on OS/X.
M include/config/SkUserConfig.h
M include/core/SkMask.h
M include/core/SkScalerContext.h
M src/core/SkBlitter_ARGB32.cpp
M src/core/SkScalerContext.cpp
M src/core/SkPaint.cpp
M src/gpu/SkGrFontScaler.cpp
M src/ports/SkFontHost_mac_coretext.cpp
M src/ports/SkFontHost_mac.cpp
M gpu/include/GrTypes.h
M gpu/src/GrAtlas.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@1672 2bbb7eff-a529-9590-31e7-b0007b416f81
SkGPipe needs this, since it cannot (unlike SkPicture) see all of the factories
before it hands its data to the reader.
In this mode, the writer embedds the factory name the first time it sees it,
and then after that writes an index (referencing the fFactorySet). The reader
installs an empty array, and as it encounters names, appends them to that array
so that subsequent indices can be used to retrieve the previously named factory.
Some of the existing patheffects did not register their factory names, so those
changes are also part of this CL. Annoyingly, to register your factory using the
current scheme, it has to be in the public section of the class definition.
git-svn-id: http://skia.googlecode.com/svn/trunk@1663 2bbb7eff-a529-9590-31e7-b0007b416f81
the internal logic, and allows SkFlattenable to rely on this when distinguishing
between 0 and indices (which will soon be negative) and string-lengths.
git-svn-id: http://skia.googlecode.com/svn/trunk@1660 2bbb7eff-a529-9590-31e7-b0007b416f81
clients don't accidentally see them defined on some platforms when they only
include SkTypes.h, and not others.
git-svn-id: http://skia.googlecode.com/svn/trunk@1373 2bbb7eff-a529-9590-31e7-b0007b416f81
Change behavior for degenerate paths: now those return kConvex instead of kUnknown
git-svn-id: http://skia.googlecode.com/svn/trunk@1330 2bbb7eff-a529-9590-31e7-b0007b416f81
Both shader and gradient_shader write matrices to the flatten stream. However, they were
just calling write(&matrix, sizeof(SkMatrix)) and the matrix can contain lazily-computed
function ptrs as part of its internal cache. Thus two matrices that are logically the
same may write different bytes.
This is a problem because picture relies on flattening objects and then using the
flatten stream as a key into its cache. This matrix-write bug effectively kills the
effectiveness of the cache for shaders.
The fix is to write proper read/write functions for matrix (and region btw). These
call through to the existing low-level flatten routines (which just write into a
memory ptr).
git-svn-id: http://skia.googlecode.com/svn/trunk@1290 2bbb7eff-a529-9590-31e7-b0007b416f81
Instead of writing all drawing and state updates into the final content stream immediately, this change creates a new ContentEntry each time the transform, clip, or paint changes. Drawing is done into a stream in the ContentEntry. When the consumer asks for the content, we combine all the ContentEntries with appropriate updates to the state (clip, transform, paint) in between. This allows us to modify the clip even after a drawing has completed. It also lets us remove ContentEntries with no drawing. Further optimization can be done to better use the stack features of PDF, for now we follow the previous model of having a single clip followed by a single transform on the graphic state stack.
Push rectangle logic into SkPDFUtil::AppendRectangle.
Change private functions to adhere to coding standards.
Review URL: http://codereview.appspot.com/4459041
git-svn-id: http://skia.googlecode.com/svn/trunk@1269 2bbb7eff-a529-9590-31e7-b0007b416f81
is it providing. Also add a templated wrapper to handle typecasting of ptr types.
git-svn-id: http://skia.googlecode.com/svn/trunk@1214 2bbb7eff-a529-9590-31e7-b0007b416f81
into a third directory, and create a summary web page with metrics for easy
inspection of the results.
git-svn-id: http://skia.googlecode.com/svn/trunk@1200 2bbb7eff-a529-9590-31e7-b0007b416f81
Tag some more API headers with SK_API so they are exposed
when doing a DLL build.
git-svn-id: http://skia.googlecode.com/svn/trunk@1193 2bbb7eff-a529-9590-31e7-b0007b416f81
note: gradient caller doesn't so we can still draw wrong when the caller
converts its initial fx from float->fixed. Perhaps SkClampRange should offer
a float interface as well.
git-svn-id: http://skia.googlecode.com/svn/trunk@1149 2bbb7eff-a529-9590-31e7-b0007b416f81
promise that const SkPaint& stay const (so we don't have bugs if a const paint
is referenced from two threads in pictures)
git-svn-id: http://skia.googlecode.com/svn/trunk@1074 2bbb7eff-a529-9590-31e7-b0007b416f81
inside a canvas (which calls setClip).
Export a global empty region. Used by SkBounder's constructor.
git-svn-id: http://skia.googlecode.com/svn/trunk@985 2bbb7eff-a529-9590-31e7-b0007b416f81
filter what text features we try to use. The filtering allows for implementation
limitations to dictate when we turn off certain text features.
git-svn-id: http://skia.googlecode.com/svn/trunk@943 2bbb7eff-a529-9590-31e7-b0007b416f81
scalar->string uses %.8g. Floats have at most 8 significant digits, plus we add
more space for sign, decimal point and exponent.
add tests to check these limits.
git-svn-id: http://skia.googlecode.com/svn/trunk@872 2bbb7eff-a529-9590-31e7-b0007b416f81
Add templated version of SkAutoTUnref.
Add unittests for it.
Remove unused helper apis on SkAutoUnref.
git-svn-id: http://skia.googlecode.com/svn/trunk@858 2bbb7eff-a529-9590-31e7-b0007b416f81
- optional parameters added to descriptorProc and allocPixels
- clip options to image decoders
- check for xfermode in blitter_a8
- UNROLL loops in blitrow
reviewed by reed@google.com
git-svn-id: http://skia.googlecode.com/svn/trunk@841 2bbb7eff-a529-9590-31e7-b0007b416f81
for another iter that runs back-to-front (B2FIter).
add unittest for Deque
git-svn-id: http://skia.googlecode.com/svn/trunk@821 2bbb7eff-a529-9590-31e7-b0007b416f81
- Change SkGraphicState to track and set the blend mode (xfermode) for modes built in to PDF (non porter duff modes + src over).
- Add SkXfermode::asMode() to retrieve xfermode as an enum for non porter duff modes.
- Move SkXfermode.cpp around a bit to support asMode() -- Generally move utility functions toward the top of the file.
- Make SkPDFFormXObject an isolated transparency group, as it used for saveLayer, which draws on transparent, not the device background.
- Set the graphic state in drawDevice and drawBitmap in order to get the right xfermode and alpha.
Review URL: http://codereview.appspot.com/4131043
git-svn-id: http://skia.googlecode.com/svn/trunk@774 2bbb7eff-a529-9590-31e7-b0007b416f81
SkSafeRef() and SkSafeUnref().
This is basically a bug waiting to happen. An optimizing compiler can remove
checks for null on "this" if it chooses. However, SkRefCnt::safeRef() relies on
precisely this check...
void SkRefCnt::safeRef() {
if (this) {
this->ref();
}
}
Since a compiler might skip the if-clause, it breaks the intention of this
method, hence its removal.
static inline void SkSafeRef(SkRefCnt* obj) {
if (obj) {
obj->ref();
}
}
This form is not ignored by an optimizing compile, so we use it instead.
git-svn-id: http://skia.googlecode.com/svn/trunk@762 2bbb7eff-a529-9590-31e7-b0007b416f81
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
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
The regression was due to the fact that we were calling PlatformColorProc() for
every span (which in turns makes CPUID, a fairly expensive call). Since we draw
a lot of rects, and rects have 1-pixel wide spans for the vertical segments,
that's a lot of CPUID.
Fixed by cacheing the result of PlatformColorProc(), as is done for the other
platform-specific blitters.
Review URL: http://codereview.appspot.com/3669042/
git-svn-id: http://skia.googlecode.com/svn/trunk@636 2bbb7eff-a529-9590-31e7-b0007b416f81
[Patch from weiwei.li@intel.com]
SSE2 optimization has been added by Stephen White before, this improves the skia
performance on SSE2-supporting platform. (please refer to below issues)
Issue 171055: More SSE2ification
Issue 157141: More SSE2ification
Issue 150060: minor tweaks to SSE2 code for -fPIC
Issue 144072: SSE2 optimizations for 32bit blending blitters
This CL implements SSE2 optimizations for the 32bit Color operation. Like above
issues, it uses CPUID to detect for SSE2 and changes the platform procs at
runtime as well. The 32bit Color operation is heavily used on Chrome HTML5
canvas operations. Take Microsoft IE test drives Pulsating Bubbles as example
(http://ie.microsoft.com/testdrive/Performance/PulsatingBubbles/Default.xhtml),
if running this cases on Chrome, the overhead of 32bit Color operation is about
40~50%. So this CL will make skia performance more better, and also make Chrome
HTML5 canvas performance more better.
Additional, this CL has passed the skia bench & tests validation, the result is
pretty good. We also apply this CL to the latest chromium, and re-run Microsoft
IE test drives Pulsating Bubbles, the performance is improved by almost 9~10%.
git-svn-id: http://skia.googlecode.com/svn/trunk@633 2bbb7eff-a529-9590-31e7-b0007b416f81
This patch adds four methods to SkBitmap. There are two functions to return
"safe size", defined as the number of pixels from the value returned by
getPixels() to the end of the allocated buffer.
There is one version of fillPixels() to copy the bitmap instance into an
external buffer (with specified size, and using specified stride), and another
fillPixels() to copy from an external buffer to the instance bitmap. In the
latter case the specified height, width and pixel format must match that used by
the bitmap instance, although the specified stride may be any value at least as
large as the minimum stride for the specified geometry. It is assumed that the
external buffer is of size at least (height - 1)*stride + width *
bytesPerPixel.
Both fillPixels() functions return false if the copy is not possible with the
specified parameters.
Review URL: http://codereview.appspot.com/2837041/
git-svn-id: http://skia.googlecode.com/svn/trunk@625 2bbb7eff-a529-9590-31e7-b0007b416f81
Supports fakeBold, underline, strikethrough, mode (fill, stroke, both), size, skew, alignment (left, center, right).
Missing is drawFontOnPath and font lookup and embedding.
Changed SkPDFString to support how it is used from drawText methods.
Moved compile assert into SkTypes.
Moved constants and utility function used to support fakeBold, underline, and strikethrough into higher level locations.
Review URL: http://codereview.appspot.com/2946041
git-svn-id: http://skia.googlecode.com/svn/trunk@624 2bbb7eff-a529-9590-31e7-b0007b416f81
The '#include "SkGLDevice.h"' from include/core/SkDevice.h requires internal
Skia code to be added to the include search paths when using the deprecated API.
This change adds back SkGLCanvas.cpp to avoid exposing SkGLDevice.h to the
public API.
The change also includes an explicit virtual destructor on SkDeviceFactory to
silence a -Wnon-virtual-dtor warning and allow for -Werror.
Original Issue: http://codereview.appspot.com/3009041/
Review URL: http://codereview.appspot.com/2994042
git-svn-id: http://skia.googlecode.com/svn/trunk@623 2bbb7eff-a529-9590-31e7-b0007b416f81
Fix the spelling of resource in several places
Make getResouce(resourceList) part of SkPDFObject
make SkDynamicMemoryWStream::getOffset and SkPDFPage::getMediaBox const
Add a temporary NOT_IMPLEMENTED macro instead of using SkASSERT
Review URL: http://codereview.appspot.com/2721041
git-svn-id: http://skia.googlecode.com/svn/trunk@619 2bbb7eff-a529-9590-31e7-b0007b416f81
These are not the capabilities of the factory, but of the device. Additionally, it is more often needed when you have a device then when you have a factory, which caused creating of a new factory.
Review URL: http://codereview.appspot.com/2720041
git-svn-id: http://skia.googlecode.com/svn/trunk@618 2bbb7eff-a529-9590-31e7-b0007b416f81