| 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 23 matching lines...) Expand all Loading... |
| 34 #include "platform/graphics/ImageBuffer.h" | 34 #include "platform/graphics/ImageBuffer.h" |
| 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 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 ImageBufferSurface::ImageBufferSurface(const IntSize& size, | 42 ImageBufferSurface::ImageBufferSurface(const IntSize& size, |
| 43 OpacityMode opacity_mode, | 43 OpacityMode opacity_mode, |
| 44 sk_sp<SkColorSpace> color_space, | 44 const CanvasColorParams& color_params) |
| 45 SkColorType color_type) | 45 : opacity_mode_(opacity_mode), size_(size), color_params_(color_params) { |
| 46 : opacity_mode_(opacity_mode), | |
| 47 size_(size), | |
| 48 color_space_(color_space), | |
| 49 color_type_(color_type) { | |
| 50 SetIsHidden(false); | 46 SetIsHidden(false); |
| 51 } | 47 } |
| 52 | 48 |
| 53 ImageBufferSurface::~ImageBufferSurface() {} | 49 ImageBufferSurface::~ImageBufferSurface() {} |
| 54 | 50 |
| 55 sk_sp<PaintRecord> ImageBufferSurface::GetRecord() { | 51 sk_sp<PaintRecord> ImageBufferSurface::GetRecord() { |
| 56 return nullptr; | 52 return nullptr; |
| 57 } | 53 } |
| 58 | 54 |
| 59 void ImageBufferSurface::Clear() { | 55 void ImageBufferSurface::Clear() { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 89 | 85 |
| 90 bool ImageBufferSurface::WritePixels(const SkImageInfo& orig_info, | 86 bool ImageBufferSurface::WritePixels(const SkImageInfo& orig_info, |
| 91 const void* pixels, | 87 const void* pixels, |
| 92 size_t row_bytes, | 88 size_t row_bytes, |
| 93 int x, | 89 int x, |
| 94 int y) { | 90 int y) { |
| 95 return Canvas()->writePixels(orig_info, pixels, row_bytes, x, y); | 91 return Canvas()->writePixels(orig_info, pixels, row_bytes, x, y); |
| 96 } | 92 } |
| 97 | 93 |
| 98 } // namespace blink | 94 } // namespace blink |
| OLD | NEW |