Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: Source/core/platform/graphics/ImageBuffer.h

Issue 23643003: ImageBuffer-less SVG masking and clipping. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed Linux rebaselines. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 25 matching lines...) Expand all
36 #include "core/platform/graphics/IntSize.h" 36 #include "core/platform/graphics/IntSize.h"
37 #include "core/platform/graphics/transforms/AffineTransform.h" 37 #include "core/platform/graphics/transforms/AffineTransform.h"
38 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
39 #include "wtf/OwnPtr.h" 39 #include "wtf/OwnPtr.h"
40 #include "wtf/PassOwnPtr.h" 40 #include "wtf/PassOwnPtr.h"
41 #include "wtf/PassRefPtr.h" 41 #include "wtf/PassRefPtr.h"
42 #include "wtf/Uint8ClampedArray.h" 42 #include "wtf/Uint8ClampedArray.h"
43 #include "wtf/Vector.h" 43 #include "wtf/Vector.h"
44 44
45 class SkCanvas; 45 class SkCanvas;
46 class SkColorFilter;
46 47
47 namespace WebKit { class WebLayer; } 48 namespace WebKit { class WebLayer; }
48 49
49 namespace WebCore { 50 namespace WebCore {
50 51
51 class Canvas2DLayerBridge; 52 class Canvas2DLayerBridge;
52 class Image; 53 class Image;
53 class ImageData; 54 class ImageData;
54 class IntPoint; 55 class IntPoint;
55 class IntRect; 56 class IntRect;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // or return CopyBackingStore if it doesn't. 110 // or return CopyBackingStore if it doesn't.
110 static BackingStoreCopy fastCopyImageMode(); 111 static BackingStoreCopy fastCopyImageMode();
111 112
112 enum CoordinateSystem { LogicalCoordinateSystem, BackingStoreCoordinateSyste m }; 113 enum CoordinateSystem { LogicalCoordinateSystem, BackingStoreCoordinateSyste m };
113 114
114 PassRefPtr<Uint8ClampedArray> getUnmultipliedImageData(const IntRect&, Coord inateSystem = LogicalCoordinateSystem) const; 115 PassRefPtr<Uint8ClampedArray> getUnmultipliedImageData(const IntRect&, Coord inateSystem = LogicalCoordinateSystem) const;
115 PassRefPtr<Uint8ClampedArray> getPremultipliedImageData(const IntRect&, Coor dinateSystem = LogicalCoordinateSystem) const; 116 PassRefPtr<Uint8ClampedArray> getPremultipliedImageData(const IntRect&, Coor dinateSystem = LogicalCoordinateSystem) const;
116 117
117 void putByteArray(Multiply multiplied, Uint8ClampedArray*, const IntSize& so urceSize, const IntRect& sourceRect, const IntPoint& destPoint, CoordinateSystem = LogicalCoordinateSystem); 118 void putByteArray(Multiply multiplied, Uint8ClampedArray*, const IntSize& so urceSize, const IntRect& sourceRect, const IntPoint& destPoint, CoordinateSystem = LogicalCoordinateSystem);
118 119
119 void convertToLuminanceMask();
120
121 String toDataURL(const String& mimeType, const double* quality = 0, Coordina teSystem = LogicalCoordinateSystem) const; 120 String toDataURL(const String& mimeType, const double* quality = 0, Coordina teSystem = LogicalCoordinateSystem) const;
122 AffineTransform baseTransform() const { return AffineTransform(); } 121 AffineTransform baseTransform() const { return AffineTransform(); }
123 void transformColorSpace(ColorSpace srcColorSpace, ColorSpace dstColorSpace) ; 122 void transformColorSpace(ColorSpace srcColorSpace, ColorSpace dstColorSpace) ;
124 static const Vector<uint8_t>& getLinearRgbLUT(); 123 static PassRefPtr<SkColorFilter> createColorSpaceFilter(ColorSpace srcColorS pace, ColorSpace dstColorSpace);
Stephen White 2013/08/28 14:11:10 I think to keep Skia types out of non-platform/ di
f(malita) 2013/08/28 19:54:38 I made this private, currently only accessible fro
125 static const Vector<uint8_t>& getDeviceRgbLUT();
126 WebKit::WebLayer* platformLayer() const; 124 WebKit::WebLayer* platformLayer() const;
127 125
128 // FIXME: current implementations of this method have the restriction that t hey only work 126 // FIXME: current implementations of this method have the restriction that t hey only work
129 // with textures that are RGB or RGBA format, UNSIGNED_BYTE type and level 0 , as specified in 127 // with textures that are RGB or RGBA format, UNSIGNED_BYTE type and level 0 , as specified in
130 // Extensions3D::canUseCopyTextureCHROMIUM(). 128 // Extensions3D::canUseCopyTextureCHROMIUM().
131 bool copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denum, G C3Denum, GC3Dint, bool, bool); 129 bool copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denum, G C3Denum, GC3Dint, bool, bool);
132 130
133 private: 131 private:
134 bool isValid() const; 132 bool isValid() const;
135 133
(...skipping 16 matching lines...) Expand all
152 // so that create() knows when it should return failure. 150 // so that create() knows when it should return failure.
153 ImageBuffer(const IntSize&, float resolutionScale, RenderingMode, OpacityMod e, bool& success); 151 ImageBuffer(const IntSize&, float resolutionScale, RenderingMode, OpacityMod e, bool& success);
154 ImageBuffer(const IntSize&, float resolutionScale, const GraphicsContext*, b ool hasAlpha, bool& success); 152 ImageBuffer(const IntSize&, float resolutionScale, const GraphicsContext*, b ool hasAlpha, bool& success);
155 }; 153 };
156 154
157 String ImageDataToDataURL(const ImageData&, const String& mimeType, const double * quality); 155 String ImageDataToDataURL(const ImageData&, const String& mimeType, const double * quality);
158 156
159 } // namespace WebCore 157 } // namespace WebCore
160 158
161 #endif // ImageBuffer_h 159 #endif // ImageBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698