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
The width and height we pass to SkDevice must be postive.
Shader can no longer use negative coordinates (without transform).
Shader unflip matrix should use same values as passed to SkPDFDevice (height).
Most Shader dictionary entries should be scalars and not ints.
Review URL: http://codereview.appspot.com/4454047
git-svn-id: http://skia.googlecode.com/svn/trunk@1219 2bbb7eff-a529-9590-31e7-b0007b416f81