The current approach of setting the existing clip just before drawing a layer into a device doesn't work. SkDevice::clear() uses existing clip before that and if we need to put the content in a transparency group (i.e. for SrcIn xfermode), we need a valid existing clip. Instead, change the factory to use a special constructor when creating a layer device.
Review URL: http://codereview.appspot.com/4495041
git-svn-id: http://skia.googlecode.com/svn/trunk@1270 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
assumes GL_RGBA texture format on all platforms except Windows (where it uses
GL_BGRA), so texture colours come out wrong. As a temporary fix, do on Linux
what we do on Windows, and assume GL_BGRA. (This should be made more general
later, and the assumption of matching formats between Skia and Ganesh removed.)
Review URL: http://codereview.appspot.com/4474046/
git-svn-id: http://skia.googlecode.com/svn/trunk@1247 2bbb7eff-a529-9590-31e7-b0007b416f81
SkOSWindow::fGLAttched (and fVi while we're at it), since it was being checked
uninitialized. Don't call has_gl_extension() while initializing the
GrGLDefaultInterface, since it derefs the default interface (which is still
NULL); use has_gl_extension_from_string() instead.
Review URL: http://codereview.appspot.com/4480041/
git-svn-id: http://skia.googlecode.com/svn/trunk@1242 2bbb7eff-a529-9590-31e7-b0007b416f81
There are two ways to build it, using the gyp files,
or using its own makefile. A recent update of a
sample made it no longer build using its own makefile.
Make it build once again.
git-svn-id: http://skia.googlecode.com/svn/trunk@1236 2bbb7eff-a529-9590-31e7-b0007b416f81
Patch from Jeff Bailey <jeffbailey@google.com>
These functions on ARM both are doing something weird where, when
optimization is not enable, there aren't enough low registers available for
the compiler to handle the asm.
My ARM-fu is pretty weak, so I have forced the functions to -O1, which
allows them to compile. It would be reasonable to set them to O2 as I
expect anyone debugging this will just tweak it as appropriate.
The error that this is solving:
third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp: In function 'void
SI8_D16_nofilter_DX_arm(const SkBitmapProcState&, const uint32_t*, int,
uint16_t*)':
third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp:101:24: error:
can't find a register in class 'LO_REGS' while reloading 'asm'
third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp:101:24: error:
'asm' operand has impossible constraints
However, it has to be set on both functions, as after the first error is
cleared, it triggers a second time.
Review URL: http://codereview.appspot.com/4452044
git-svn-id: http://skia.googlecode.com/svn/trunk@1228 2bbb7eff-a529-9590-31e7-b0007b416f81