| 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 "cc/debug/picture_debug_util.h" | 5 #include "cc/debug/picture_debug_util.h" |
| 6 | 6 |
| 7 #include <limits> |
| 7 #include <vector> | 8 #include <vector> |
| 8 | 9 |
| 9 #include "base/base64.h" | 10 #include "base/base64.h" |
| 10 #include "base/logging.h" | 11 #include "base/logging.h" |
| 11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 12 #include "third_party/skia/include/core/SkBitmap.h" | 13 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 #include "third_party/skia/include/core/SkData.h" | 14 #include "third_party/skia/include/core/SkData.h" |
| 14 #include "third_party/skia/include/core/SkImageInfo.h" | 15 #include "third_party/skia/include/core/SkImageInfo.h" |
| 15 #include "third_party/skia/include/core/SkPicture.h" | 16 #include "third_party/skia/include/core/SkPicture.h" |
| 16 #include "third_party/skia/include/core/SkPixelSerializer.h" | 17 #include "third_party/skia/include/core/SkPixelSerializer.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 picture->serialize(&stream, &serializer); | 68 picture->serialize(&stream, &serializer); |
| 68 | 69 |
| 69 size_t serialized_size = stream.bytesWritten(); | 70 size_t serialized_size = stream.bytesWritten(); |
| 70 scoped_ptr<char[]> serialized_picture(new char[serialized_size]); | 71 scoped_ptr<char[]> serialized_picture(new char[serialized_size]); |
| 71 stream.copyTo(serialized_picture.get()); | 72 stream.copyTo(serialized_picture.get()); |
| 72 base::Base64Encode(std::string(serialized_picture.get(), serialized_size), | 73 base::Base64Encode(std::string(serialized_picture.get(), serialized_size), |
| 73 output); | 74 output); |
| 74 } | 75 } |
| 75 | 76 |
| 76 } // namespace cc | 77 } // namespace cc |
| OLD | NEW |