| Index: Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| diff --git a/Source/core/platform/graphics/GaneshUtils.h b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| similarity index 73%
|
| copy from Source/core/platform/graphics/GaneshUtils.h
|
| copy to Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| index a86b0efb597435880efd77b9d991c2fa102fd756..90f5c20b305fd1775837d00b658daa19907d4366 100644
|
| --- a/Source/core/platform/graphics/GaneshUtils.h
|
| +++ b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| @@ -28,17 +28,25 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef GaneshUtils_h
|
| -#define GaneshUtils_h
|
| +#include "config.h"
|
|
|
| -#include "platform/geometry/IntSize.h"
|
| -#include "third_party/skia/include/core/SkBitmap.h"
|
| -#include "third_party/skia/include/gpu/GrContext.h"
|
| +#include "platform/graphics/UnacceleratedImageBufferSurface.h"
|
| +
|
| +#include "third_party/skia/include/core/SkCanvas.h"
|
| +#include "wtf/PassOwnPtr.h"
|
|
|
| namespace WebCore {
|
|
|
| -bool ensureTextureBackedSkBitmap(GrContext*, SkBitmap&, const IntSize&, GrSurfaceOrigin, GrPixelConfig);
|
| +UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(const IntSize& size, OpacityMode opacityMode, float resolutionScale)
|
| + : ImageBufferSurface(size, opacityMode, resolutionScale)
|
| +{
|
| + SkBitmap bitmap;
|
| + bitmap.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height());
|
| + bitmap.allocPixels();
|
| + if (bitmap.isNull())
|
| + return;
|
| + m_canvas = adoptPtr(new SkCanvas(bitmap));
|
| + clear();
|
| +}
|
|
|
| } // namespace WebCore
|
| -
|
| -#endif // GaneshUtils_h
|
|
|