DCHECK(buffer->memory(0));
// RasterBufferProvider::PlaybackToMemory only supports unsigned strides.
DCHECK_GE(buffer->stride(0), 0);
-
+#if defined(OS_TIZEN)
+ if (!buffer->memory(0) || buffer->stride(0) < 0) {
+ LOG(ERROR) << "Backing buffer creation for rasterization fails";
+ return;
+ }
+#endif
// TODO(https://crbug.com/870663): Temporary diagnostics.
base::debug::Alias(&playback_rect);
base::debug::Alias(&full_rect_size);
DCHECK(!playback_rect.IsEmpty())
<< "Why are we rastering a tile that's not dirty?";
RasterBufferProvider::PlaybackToMemory(
- buffer->memory(0), format, staging_buffer->size, buffer->stride(0),
- raster_source, raster_full_rect, playback_rect, transform,
- dst_color_space, /*gpu_compositing=*/true, playback_settings);
+ buffer->memory(0), format, staging_buffer->size, buffer->stride(0),
+ raster_source, raster_full_rect, playback_rect, transform,
+ dst_color_space, /*gpu_compositing=*/true, playback_settings);
buffer->Unmap();
staging_buffer->content_id = new_content_id;
}
video_renderer_ = std::make_unique<PaintCanvasVideoRenderer>();
SoftwarePlaneResource* software_resource = plane_resource->AsSoftware();
+#if defined(OS_TIZEN)
+ if (!software_resource->pixels()) {
+ LOG(ERROR) << " Invalid Software Resource "
+ << software_resource->resource_size().width() << ":"
+ << software_resource->resource_size().height();
+ return VideoFrameExternalResources();
+ }
+#endif
// We know the format is RGBA_8888 from check above.
SkImageInfo info = SkImageInfo::MakeN32Premul(
gfx::SizeToSkISize(software_resource->resource_size()));
SkBitmap sk_bitmap;
+#if defined(OS_TIZEN)
+ bool success = sk_bitmap.installPixels(
+ info, software_resource->pixels(), info.minRowBytes());
+ if (!success) {
+ LOG(ERROR) << " SkBitmap installPixels failed ";
+ return VideoFrameExternalResources();
+ }
+#else
sk_bitmap.installPixels(info, software_resource->pixels(),
info.minRowBytes());
// This is software path, so |canvas| and |video_frame| are always
// backed by software.
+#endif
cc::SkiaPaintCanvas canvas(sk_bitmap);
cc::PaintFlags flags;
flags.setBlendMode(SkBlendMode::kSrc);