| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 SkAlphaType alphaType = (Opaque == opacityMode) ? kOpaque_SkAlphaType : kPre
mul_SkAlphaType; | 51 SkAlphaType alphaType = (Opaque == opacityMode) ? kOpaque_SkAlphaType : kPre
mul_SkAlphaType; |
| 52 SkImageInfo info = SkImageInfo::MakeN32(size.width(), size.height(), alphaTy
pe); | 52 SkImageInfo info = SkImageInfo::MakeN32(size.width(), size.height(), alphaTy
pe); |
| 53 SkSurfaceProps disableLCDProps(0, kUnknown_SkPixelGeometry); | 53 SkSurfaceProps disableLCDProps(0, kUnknown_SkPixelGeometry); |
| 54 m_surface = adoptPtr(SkSurface::NewRenderTarget(grContext, SkSurface::kYes_B
udgeted, info, 0 /* sampleCount */, | 54 m_surface = adoptPtr(SkSurface::NewRenderTarget(grContext, SkSurface::kYes_B
udgeted, info, 0 /* sampleCount */, |
| 55 Opaque == opacityMode ? nullptr : &disableLCDProps)); | 55 Opaque == opacityMode ? nullptr : &disableLCDProps)); |
| 56 if (!m_surface.get()) | 56 if (!m_surface.get()) |
| 57 return; | 57 return; |
| 58 clear(); | 58 clear(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 PassRefPtr<SkImage> AcceleratedImageBufferSurface::newImageSnapshot(Acceleration
Hint) | 61 PassRefPtr<SkImage> AcceleratedImageBufferSurface::newImageSnapshot(Acceleration
Hint, SnapshotReason) |
| 62 { | 62 { |
| 63 return adoptRef(m_surface->newImageSnapshot()); | 63 return adoptRef(m_surface->newImageSnapshot()); |
| 64 } | 64 } |
| 65 | 65 |
| 66 Platform3DObject AcceleratedImageBufferSurface::getBackingTextureHandleForOverwr
ite() | 66 Platform3DObject AcceleratedImageBufferSurface::getBackingTextureHandleForOverwr
ite() |
| 67 { | 67 { |
| 68 if (!m_surface) | 68 if (!m_surface) |
| 69 return 0; | 69 return 0; |
| 70 return m_surface->getTextureHandle(SkSurface::kDiscardWrite_TextureHandleAcc
ess); | 70 return m_surface->getTextureHandle(SkSurface::kDiscardWrite_TextureHandleAcc
ess); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace blink | 73 } // namespace blink |
| OLD | NEW |