| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "platform/graphics/StaticBitmapImage.h" | 35 #include "platform/graphics/StaticBitmapImage.h" |
| 36 #include "third_party/skia/include/core/SkColorSpace.h" | 36 #include "third_party/skia/include/core/SkColorSpace.h" |
| 37 #include "third_party/skia/include/core/SkImage.h" | 37 #include "third_party/skia/include/core/SkImage.h" |
| 38 | 38 |
| 39 class SkPicture; | 39 class SkPicture; |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 ImageBufferSurface::ImageBufferSurface(const IntSize& size, | 43 ImageBufferSurface::ImageBufferSurface(const IntSize& size, |
| 44 OpacityMode opacityMode, | 44 OpacityMode opacityMode, |
| 45 sk_sp<SkColorSpace> colorSpace) | 45 sk_sp<SkColorSpace> colorSpace, |
| 46 : m_opacityMode(opacityMode), m_size(size), m_colorSpace(colorSpace) { | 46 SkColorType colorType) |
| 47 : m_opacityMode(opacityMode), |
| 48 m_size(size), |
| 49 m_colorSpace(colorSpace), |
| 50 m_colorType(colorType) { |
| 47 setIsHidden(false); | 51 setIsHidden(false); |
| 48 } | 52 } |
| 49 | 53 |
| 50 ImageBufferSurface::~ImageBufferSurface() {} | 54 ImageBufferSurface::~ImageBufferSurface() {} |
| 51 | 55 |
| 52 sk_sp<SkPicture> ImageBufferSurface::getPicture() { | 56 sk_sp<SkPicture> ImageBufferSurface::getPicture() { |
| 53 return nullptr; | 57 return nullptr; |
| 54 } | 58 } |
| 55 | 59 |
| 56 void ImageBufferSurface::clear() { | 60 void ImageBufferSurface::clear() { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 86 | 90 |
| 87 bool ImageBufferSurface::writePixels(const SkImageInfo& origInfo, | 91 bool ImageBufferSurface::writePixels(const SkImageInfo& origInfo, |
| 88 const void* pixels, | 92 const void* pixels, |
| 89 size_t rowBytes, | 93 size_t rowBytes, |
| 90 int x, | 94 int x, |
| 91 int y) { | 95 int y) { |
| 92 return canvas()->writePixels(origInfo, pixels, rowBytes, x, y); | 96 return canvas()->writePixels(origInfo, pixels, rowBytes, x, y); |
| 93 } | 97 } |
| 94 | 98 |
| 95 } // namespace blink | 99 } // namespace blink |
| OLD | NEW |