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

Side by Side Diff: sky/engine/platform/graphics/ImageBuffer.h

Issue 1229113003: Remove some unneeded DEPS from //sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
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 13 matching lines...) Expand all
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #ifndef SKY_ENGINE_PLATFORM_GRAPHICS_IMAGEBUFFER_H_ 28 #ifndef SKY_ENGINE_PLATFORM_GRAPHICS_IMAGEBUFFER_H_
29 #define SKY_ENGINE_PLATFORM_GRAPHICS_IMAGEBUFFER_H_ 29 #define SKY_ENGINE_PLATFORM_GRAPHICS_IMAGEBUFFER_H_
30 30
31 #include "sky/engine/platform/PlatformExport.h" 31 #include "sky/engine/platform/PlatformExport.h"
32 #include "sky/engine/platform/geometry/FloatRect.h" 32 #include "sky/engine/platform/geometry/FloatRect.h"
33 #include "sky/engine/platform/geometry/IntSize.h" 33 #include "sky/engine/platform/geometry/IntSize.h"
34 #include "sky/engine/platform/graphics/Canvas2DLayerBridge.h"
35 #include "sky/engine/platform/graphics/ColorSpace.h" 34 #include "sky/engine/platform/graphics/ColorSpace.h"
36 #include "sky/engine/platform/graphics/GraphicsTypes.h" 35 #include "sky/engine/platform/graphics/GraphicsTypes.h"
37 #include "sky/engine/platform/graphics/GraphicsTypes3D.h"
38 #include "sky/engine/platform/graphics/ImageBufferSurface.h" 36 #include "sky/engine/platform/graphics/ImageBufferSurface.h"
39 #include "sky/engine/platform/transforms/AffineTransform.h" 37 #include "sky/engine/platform/transforms/AffineTransform.h"
40 #include "sky/engine/wtf/Forward.h" 38 #include "sky/engine/wtf/Forward.h"
41 #include "sky/engine/wtf/OwnPtr.h" 39 #include "sky/engine/wtf/OwnPtr.h"
42 #include "sky/engine/wtf/PassOwnPtr.h" 40 #include "sky/engine/wtf/PassOwnPtr.h"
43 #include "sky/engine/wtf/PassRefPtr.h" 41 #include "sky/engine/wtf/PassRefPtr.h"
44 #include "sky/engine/wtf/Uint8ClampedArray.h" 42 #include "sky/engine/wtf/Uint8ClampedArray.h"
45 43
46 namespace blink { 44 namespace blink {
47 45
48 class DrawingBuffer;
49 class GraphicsContext; 46 class GraphicsContext;
50 class Image; 47 class Image;
51 class ImageBufferClient; 48 class ImageBufferClient;
52 class IntPoint; 49 class IntPoint;
53 class IntRect; 50 class IntRect;
54 class WebGraphicsContext3D; 51 class WebGraphicsContext3D;
55 52
56 enum Multiply { 53 enum Multiply {
57 Premultiplied, 54 Premultiplied,
58 Unmultiplied 55 Unmultiplied
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 99
103 PassRefPtr<Uint8ClampedArray> getImageData(Multiply, const IntRect&) const; 100 PassRefPtr<Uint8ClampedArray> getImageData(Multiply, const IntRect&) const;
104 101
105 void putByteArray(Multiply, Uint8ClampedArray*, const IntSize& sourceSize, c onst IntRect& sourceRect, const IntPoint& destPoint); 102 void putByteArray(Multiply, Uint8ClampedArray*, const IntSize& sourceSize, c onst IntRect& sourceRect, const IntPoint& destPoint);
106 103
107 String toDataURL(const String& mimeType, const double* quality = 0) const; 104 String toDataURL(const String& mimeType, const double* quality = 0) const;
108 AffineTransform baseTransform() const { return AffineTransform(); } 105 AffineTransform baseTransform() const { return AffineTransform(); }
109 void transformColorSpace(ColorSpace srcColorSpace, ColorSpace dstColorSpace) ; 106 void transformColorSpace(ColorSpace srcColorSpace, ColorSpace dstColorSpace) ;
110 WebLayer* platformLayer() const; 107 WebLayer* platformLayer() const;
111 108
112 // FIXME: current implementations of this method have the restriction that t hey only work
113 // with textures that are RGB or RGBA format, UNSIGNED_BYTE type and level 0 , as specified in
114 // Extensions3D::canUseCopyTextureCHROMIUM().
115 // Destroys the TEXTURE_2D binding for the active texture unit of the passed context
116 bool copyToPlatformTexture(WebGraphicsContext3D*, Platform3DObject, GLenum, GLenum, GLint, bool, bool);
117
118 Platform3DObject getBackingTexture();
119
120 bool copyRenderingResultsFromDrawingBuffer(DrawingBuffer*, bool fromFrontBuf fer = false);
121
122 void flush(); 109 void flush();
123 110
124 void notifySurfaceInvalid(); 111 void notifySurfaceInvalid();
125 112
126 private: 113 private:
127 ImageBuffer(PassOwnPtr<ImageBufferSurface>); 114 ImageBuffer(PassOwnPtr<ImageBufferSurface>);
128 115
129 void draw(GraphicsContext*, const FloatRect&, const FloatRect* = 0, Composit eOperator = CompositeSourceOver, WebBlendMode = WebBlendModeNormal); 116 void draw(GraphicsContext*, const FloatRect&, const FloatRect* = 0, Composit eOperator = CompositeSourceOver, WebBlendMode = WebBlendModeNormal);
130 void drawPattern(GraphicsContext*, const FloatRect&, const FloatSize&, const FloatPoint&, CompositeOperator, const FloatRect&, WebBlendMode, const IntSize& repeatSpacing = IntSize()); 117 void drawPattern(GraphicsContext*, const FloatRect&, const FloatSize&, const FloatPoint&, CompositeOperator, const FloatRect&, WebBlendMode, const IntSize& repeatSpacing = IntSize());
131 static PassRefPtr<SkColorFilter> createColorSpaceFilter(ColorSpace srcColorS pace, ColorSpace dstColorSpace); 118 static PassRefPtr<SkColorFilter> createColorSpaceFilter(ColorSpace srcColorS pace, ColorSpace dstColorSpace);
(...skipping 16 matching lines...) Expand all
148 135
149 IntSize m_size; 136 IntSize m_size;
150 RefPtr<Uint8ClampedArray> m_data; 137 RefPtr<Uint8ClampedArray> m_data;
151 }; 138 };
152 139
153 String PLATFORM_EXPORT ImageDataToDataURL(const ImageDataBuffer&, const String& mimeType, const double* quality); 140 String PLATFORM_EXPORT ImageDataToDataURL(const ImageDataBuffer&, const String& mimeType, const double* quality);
154 141
155 } // namespace blink 142 } // namespace blink
156 143
157 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_IMAGEBUFFER_H_ 144 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_IMAGEBUFFER_H_
OLDNEW
« no previous file with comments | « sky/engine/platform/graphics/GraphicsTypes3D.h ('k') | sky/engine/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698