LCOV - code coverage report
Current view: top level - gfx/skia/skia/src/core - SkFlattenableSerialization.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 13 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright 2013 Google Inc.
       3             :  *
       4             :  * Use of this source code is governed by a BSD-style license that can be
       5             :  * found in the LICENSE file.
       6             :  */
       7             : 
       8             : #include "SkFlattenableSerialization.h"
       9             : 
      10             : #include "SkData.h"
      11             : #include "SkValidatingReadBuffer.h"
      12             : #include "SkWriteBuffer.h"
      13             : 
      14           0 : SkData* SkValidatingSerializeFlattenable(SkFlattenable* flattenable) {
      15           0 :     SkBinaryWriteBuffer writer;
      16           0 :     writer.writeFlattenable(flattenable);
      17           0 :     size_t size = writer.bytesWritten();
      18           0 :     auto data = SkData::MakeUninitialized(size);
      19           0 :     writer.writeToMemory(data->writable_data());
      20           0 :     return data.release();
      21             : }
      22             : 
      23           0 : SkFlattenable* SkValidatingDeserializeFlattenable(const void* data, size_t size,
      24             :                                                   SkFlattenable::Type type) {
      25           0 :     SkValidatingReadBuffer buffer(data, size);
      26           0 :     return buffer.readFlattenable(type);
      27             : }
      28             : 
      29           0 : sk_sp<SkImageFilter> SkValidatingDeserializeImageFilter(const void* data, size_t size) {
      30           0 :     return sk_sp<SkImageFilter>((SkImageFilter*)SkValidatingDeserializeFlattenable(
      31           0 :                                 data, size, SkImageFilter::GetFlattenableType()));
      32             : }

Generated by: LCOV version 1.13