Add Skia to CG adapter for plugins.

Skia on Mac uses Skia to render WebKit, and CG
to render UI elements. The CG elements need a
transcribed graphics context that preserves the
canvas matrix, and the canvas clip.

The SkiaBitLocker utility class sets up a CGContext
from the SkCanvas, locks the bitmap's bits, and
releases the lock when the class goes out of scope.

The SkiaBitLocker implementation is described by
this patch:
http://codereview.chromium.org/7031006/

For ppapi, use the CG bitmap copy only if Skia
is not used.

Otherwise, adjust the Mac-specific code to convert
the canvas to a CGContext as needed.

Also, add a CG-specific entry point for painting
so that the delegate can paint using a WebCanvas,
while the proxy paints with a CGContext.

This change adds a code path that will be enabled
in the future, but does not modify any
existing code, so there is no functional change.

BUG=79463
TEST=none

Review URL: http://codereview.chromium.org/6823081

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86662 0039d316-1c4b-4281-b951-d872f2087c98
6 files changed