| 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 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "platform/graphics/gpu/AcceleratedImageBufferSurface.h" | 31 #include "platform/graphics/gpu/AcceleratedImageBufferSurface.h" |
| 32 | 32 |
| 33 #include "platform/graphics/gpu/SharedGpuContext.h" | 33 #include "platform/graphics/gpu/SharedGpuContext.h" |
| 34 #include "platform/graphics/skia/SkiaUtils.h" | 34 #include "platform/graphics/skia/SkiaUtils.h" |
| 35 #include "platform/wtf/PtrUtil.h" |
| 36 #include "platform/wtf/RefPtr.h" |
| 35 #include "skia/ext/texture_handle.h" | 37 #include "skia/ext/texture_handle.h" |
| 36 #include "third_party/skia/include/gpu/GrContext.h" | 38 #include "third_party/skia/include/gpu/GrContext.h" |
| 37 #include "wtf/PtrUtil.h" | |
| 38 #include "wtf/RefPtr.h" | |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 AcceleratedImageBufferSurface::AcceleratedImageBufferSurface( | 42 AcceleratedImageBufferSurface::AcceleratedImageBufferSurface( |
| 43 const IntSize& size, | 43 const IntSize& size, |
| 44 OpacityMode opacityMode, | 44 OpacityMode opacityMode, |
| 45 sk_sp<SkColorSpace> colorSpace, | 45 sk_sp<SkColorSpace> colorSpace, |
| 46 SkColorType colorType) | 46 SkColorType colorType) |
| 47 : ImageBufferSurface(size, opacityMode, colorSpace, colorType) { | 47 : ImageBufferSurface(size, opacityMode, colorSpace, colorType) { |
| 48 if (!SharedGpuContext::isValid()) | 48 if (!SharedGpuContext::isValid()) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 GLuint AcceleratedImageBufferSurface::getBackingTextureHandleForOverwrite() { | 83 GLuint AcceleratedImageBufferSurface::getBackingTextureHandleForOverwrite() { |
| 84 if (!m_surface) | 84 if (!m_surface) |
| 85 return 0; | 85 return 0; |
| 86 return skia::GrBackendObjectToGrGLTextureInfo( | 86 return skia::GrBackendObjectToGrGLTextureInfo( |
| 87 m_surface->getTextureHandle( | 87 m_surface->getTextureHandle( |
| 88 SkSurface::kDiscardWrite_TextureHandleAccess)) | 88 SkSurface::kDiscardWrite_TextureHandleAccess)) |
| 89 ->fID; | 89 ->fID; |
| 90 } | 90 } |
| 91 | 91 |
| 92 } // namespace blink | 92 } // namespace blink |
| OLD | NEW |