OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sky/compositor/picture_serializer.h" | 5 #include "sky/viewer/compositor/picture_serializer.h" |
6 | 6 |
7 #include "third_party/skia/include/core/SkData.h" | 7 #include "third_party/skia/include/core/SkData.h" |
8 #include "third_party/skia/include/core/SkPixelSerializer.h" | 8 #include "third_party/skia/include/core/SkPixelSerializer.h" |
9 #include "third_party/skia/include/core/SkStream.h" | 9 #include "third_party/skia/include/core/SkStream.h" |
10 #include "ui/gfx/codec/png_codec.h" | 10 #include "ui/gfx/codec/png_codec.h" |
11 | 11 |
12 namespace sky { | 12 namespace sky { |
13 | 13 |
14 class PngPixelSerializer : public SkPixelSerializer { | 14 class PngPixelSerializer : public SkPixelSerializer { |
15 public: | 15 public: |
(...skipping 11 matching lines...) Expand all Loading... |
27 } | 27 } |
28 }; | 28 }; |
29 | 29 |
30 void SerializePicture(const char* file_name, SkPicture* picture) { | 30 void SerializePicture(const char* file_name, SkPicture* picture) { |
31 SkFILEWStream stream(file_name); | 31 SkFILEWStream stream(file_name); |
32 PngPixelSerializer serializer; | 32 PngPixelSerializer serializer; |
33 picture->serialize(&stream, &serializer); | 33 picture->serialize(&stream, &serializer); |
34 } | 34 } |
35 | 35 |
36 } // namespace sky | 36 } // namespace sky |
OLD | NEW |