| Index: cc/test/skia_common.cc
|
| diff --git a/cc/test/skia_common.cc b/cc/test/skia_common.cc
|
| index 1ccb2d1add07c5ca321f943b4a0496cc3ff40249..ef61e217fc52adfc5468750230087a4d11a2e78f 100644
|
| --- a/cc/test/skia_common.cc
|
| +++ b/cc/test/skia_common.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "cc/test/skia_common.h"
|
|
|
| +#include "cc/resources/display_item_list.h"
|
| #include "cc/resources/picture.h"
|
| #include "skia/ext/refptr.h"
|
| #include "third_party/skia/include/core/SkCanvas.h"
|
| @@ -26,6 +27,18 @@ void DrawPicture(unsigned char* buffer,
|
| picture->Raster(&canvas, NULL, negated_content_region, 1.0f);
|
| }
|
|
|
| +void DrawDisplayList(unsigned char* buffer,
|
| + const gfx::Rect& layer_rect,
|
| + scoped_refptr<DisplayItemList> list) {
|
| + SkImageInfo info =
|
| + SkImageInfo::MakeN32Premul(layer_rect.width(), layer_rect.height());
|
| + SkBitmap bitmap;
|
| + bitmap.installPixels(info, buffer, info.minRowBytes());
|
| + SkCanvas canvas(bitmap);
|
| + canvas.clipRect(gfx::RectToSkRect(layer_rect));
|
| + list->Raster(&canvas, NULL, 1.0f);
|
| +}
|
| +
|
| void CreateBitmap(const gfx::Size& size, const char* uri, SkBitmap* bitmap) {
|
| SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height());
|
|
|
|
|