Chromium Code Reviews| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 UnacceleratedImageBufferSurface::~UnacceleratedImageBufferSurface() {} | 66 UnacceleratedImageBufferSurface::~UnacceleratedImageBufferSurface() {} |
| 67 | 67 |
| 68 PaintCanvas* UnacceleratedImageBufferSurface::Canvas() { | 68 PaintCanvas* UnacceleratedImageBufferSurface::Canvas() { |
| 69 return canvas_.get(); | 69 return canvas_.get(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool UnacceleratedImageBufferSurface::IsValid() const { | 72 bool UnacceleratedImageBufferSurface::IsValid() const { |
| 73 return surface_; | 73 return surface_; |
| 74 } | 74 } |
| 75 | 75 |
| 76 bool UnacceleratedImageBufferSurface::WritePixels(const SkImageInfo& orig_info, | |
| 77 const void* pixels, | |
| 78 size_t row_bytes, | |
| 79 int x, | |
| 80 int y) { | |
| 81 return surface_->getCanvas()->writePixels(orig_info, pixels, row_bytes, x, y); | |
|
xlai (Olivia)
2017/04/19 21:13:41
You put a DCHECK(surface_) in AcceleratedImageBuff
danakj
2017/04/19 21:19:05
Oh, I cargoculted that TBH it shouldn't matter in
| |
| 82 } | |
| 83 | |
| 76 sk_sp<SkImage> UnacceleratedImageBufferSurface::NewImageSnapshot( | 84 sk_sp<SkImage> UnacceleratedImageBufferSurface::NewImageSnapshot( |
| 77 AccelerationHint, | 85 AccelerationHint, |
| 78 SnapshotReason) { | 86 SnapshotReason) { |
| 79 return surface_->makeImageSnapshot(); | 87 return surface_->makeImageSnapshot(); |
| 80 } | 88 } |
| 81 | 89 |
| 82 } // namespace blink | 90 } // namespace blink |
| OLD | NEW |