- 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
This prevents two copies of the content stream from sticking around. It also fixes an invalid memory reference because SkCanvas::internalRestore deletes the device (maybe it should just unref) after drawing it onto the main device.
Review URL: http://codereview.appspot.com/4080056
git-svn-id: http://skia.googlecode.com/svn/trunk@773 2bbb7eff-a529-9590-31e7-b0007b416f81
created path.
todo: convexity perhaps should be tristate: yes, no, unknown
git-svn-id: http://skia.googlecode.com/svn/trunk@768 2bbb7eff-a529-9590-31e7-b0007b416f81
update rlepixelref to not use safeRef/safeUnref (as those are gone now)
git-svn-id: http://skia.googlecode.com/svn/trunk@767 2bbb7eff-a529-9590-31e7-b0007b416f81
really need a better way to compare gpu images, given that different gpus can
legitimately hit different pixels :(
git-svn-id: http://skia.googlecode.com/svn/trunk@763 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
In GrGpuGL::readPixels make sure current rendertarget has been made current in GL before calling glReadPixels
git-svn-id: http://skia.googlecode.com/svn/trunk@761 2bbb7eff-a529-9590-31e7-b0007b416f81
Currently gm ends up writing the same PDF four times. This fixes that problem, making PDF a first class citizen and providing a better framework for additional backends. Read support for PDF is still missing though.
Review URL: http://codereview.appspot.com/4130045
git-svn-id: http://skia.googlecode.com/svn/trunk@759 2bbb7eff-a529-9590-31e7-b0007b416f81
Change the code to fill out the metrics even if the font isn't embeddable. Previously, if the font wasn't embeddable, the code would set the type to not embeddable and return without filling out the rest of the metrics.
Review URL: http://codereview.appspot.com/3973053
git-svn-id: http://skia.googlecode.com/svn/trunk@758 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
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
-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