| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 PlatformLayer* platformLayer() const; | 122 PlatformLayer* platformLayer() const; |
| 123 | 123 |
| 124 // FIXME: current implementations of this method have the restriction th
at they only work | 124 // FIXME: current implementations of this method have the restriction th
at they only work |
| 125 // with textures that are RGB or RGBA format, UNSIGNED_BYTE type and lev
el 0, as specified in | 125 // with textures that are RGB or RGBA format, UNSIGNED_BYTE type and lev
el 0, as specified in |
| 126 // Extensions3D::canUseCopyTextureCHROMIUM(). | 126 // Extensions3D::canUseCopyTextureCHROMIUM(). |
| 127 bool copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denu
m, GC3Denum, GC3Dint, bool, bool); | 127 bool copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denu
m, GC3Denum, GC3Dint, bool, bool); |
| 128 | 128 |
| 129 void reportMemoryUsage(MemoryObjectInfo*) const; | 129 void reportMemoryUsage(MemoryObjectInfo*) const; |
| 130 | 130 |
| 131 private: | 131 private: |
| 132 bool isValid() const; |
| 132 void clip(GraphicsContext*, const FloatRect&) const; | 133 void clip(GraphicsContext*, const FloatRect&) const; |
| 133 | 134 |
| 134 void draw(GraphicsContext*, ColorSpace, const FloatRect& destRect, const
FloatRect& srcRect = FloatRect(0, 0, -1, -1), CompositeOperator = CompositeSour
ceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false); | 135 void draw(GraphicsContext*, ColorSpace, const FloatRect& destRect, const
FloatRect& srcRect = FloatRect(0, 0, -1, -1), CompositeOperator = CompositeSour
ceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false); |
| 135 void drawPattern(GraphicsContext*, const FloatRect& srcRect, const Affin
eTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpac
e, CompositeOperator, const FloatRect& destRect); | 136 void drawPattern(GraphicsContext*, const FloatRect& srcRect, const Affin
eTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpac
e, CompositeOperator, const FloatRect& destRect); |
| 136 | 137 |
| 137 inline void genericConvertToLuminanceMask(); | 138 inline void genericConvertToLuminanceMask(); |
| 138 | 139 |
| 139 friend class GraphicsContext; | 140 friend class GraphicsContext; |
| 140 friend class GeneratedImage; | 141 friend class GeneratedImage; |
| 141 friend class CrossfadeGeneratedImage; | 142 friend class CrossfadeGeneratedImage; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 152 // so that create() knows when it should return failure. | 153 // so that create() knows when it should return failure. |
| 153 ImageBuffer(const IntSize&, float resolutionScale, ColorSpace, Rendering
Mode, OpacityMode, bool& success); | 154 ImageBuffer(const IntSize&, float resolutionScale, ColorSpace, Rendering
Mode, OpacityMode, bool& success); |
| 154 ImageBuffer(const IntSize&, float resolutionScale, ColorSpace, const Gra
phicsContext*, bool hasAlpha, bool& success); | 155 ImageBuffer(const IntSize&, float resolutionScale, ColorSpace, const Gra
phicsContext*, bool hasAlpha, bool& success); |
| 155 }; | 156 }; |
| 156 | 157 |
| 157 String ImageDataToDataURL(const ImageData&, const String& mimeType, const do
uble* quality); | 158 String ImageDataToDataURL(const ImageData&, const String& mimeType, const do
uble* quality); |
| 158 | 159 |
| 159 } // namespace WebCore | 160 } // namespace WebCore |
| 160 | 161 |
| 161 #endif // ImageBuffer_h | 162 #endif // ImageBuffer_h |
| OLD | NEW |