Chromium Code Reviews| Index: cc/resources/picture.cc |
| diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc |
| index de6ff93506f7a85ac2ed7bbaae4f8000dcc97fcd..d9c21854d25326398007c33d40f2007dcb08c970 100644 |
| --- a/cc/resources/picture.cc |
| +++ b/cc/resources/picture.cc |
| @@ -273,17 +273,19 @@ void Picture::Record(ContentLayerClient* painter, |
| &factory, |
| SkPicture::kUsePathBoundsForClip_RecordingFlag)); |
| + ContentLayerClient::GraphicsContextStatus graphics_context_status = |
| + ContentLayerClient::GraphicsContextEnabled; |
| + |
| switch (recording_mode) { |
| case RECORD_NORMALLY: |
| - // Already setup for normal recording |
| + // Already setup for normal recording. |
| break; |
| case RECORD_WITH_SK_NULL_CANVAS: |
| canvas = skia::AdoptRef(SkCreateNullCanvas()); |
| break; |
| case RECORD_WITH_PAINTING_DISABLED: |
| - // Blink's GraphicsContext will disable painting when given a NULL |
| - // canvas. |
| - canvas.clear(); |
| + // We pass a disable flag through the paint calls. |
| + graphics_context_status = ContentLayerClient::GraphicsContextDisabled; |
| break; |
| case RECORD_WITH_SKRECORD: |
| recording.reset(new EXPERIMENTAL::SkRecording(layer_rect_.width(), |
| @@ -307,7 +309,8 @@ void Picture::Record(ContentLayerClient* painter, |
| } |
| gfx::RectF opaque_layer_rect; |
| - painter->PaintContents(canvas.get(), layer_rect_, &opaque_layer_rect); |
| + painter->PaintContents( |
| + canvas.get(), layer_rect_, &opaque_layer_rect, graphics_context_status); |
| if (canvas) |
|
danakj
2014/05/01 17:07:50
and this?
Stephen Chennney
2014/05/01 19:12:26
Done.
|
| canvas->restore(); |