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

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

Issue 22929012: Change Canvas2DLayerBridge to stay alive until last mailbox is returned. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Trivial fix for layout test failure 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
« no previous file with comments | « no previous file | Source/core/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 27
28 #ifndef ImageBuffer_h 28 #ifndef ImageBuffer_h
29 #define ImageBuffer_h 29 #define ImageBuffer_h
30 30
31 #include "core/platform/graphics/ColorSpace.h" 31 #include "core/platform/graphics/ColorSpace.h"
32 #include "core/platform/graphics/FloatRect.h" 32 #include "core/platform/graphics/FloatRect.h"
33 #include "core/platform/graphics/GraphicsContext.h" 33 #include "core/platform/graphics/GraphicsContext.h"
34 #include "core/platform/graphics/GraphicsTypes.h" 34 #include "core/platform/graphics/GraphicsTypes.h"
35 #include "core/platform/graphics/GraphicsTypes3D.h" 35 #include "core/platform/graphics/GraphicsTypes3D.h"
36 #include "core/platform/graphics/IntSize.h" 36 #include "core/platform/graphics/IntSize.h"
37 #include "core/platform/graphics/chromium/Canvas2DLayerBridge.h"
37 #include "core/platform/graphics/transforms/AffineTransform.h" 38 #include "core/platform/graphics/transforms/AffineTransform.h"
38 #include "wtf/Forward.h" 39 #include "wtf/Forward.h"
39 #include "wtf/OwnPtr.h" 40 #include "wtf/OwnPtr.h"
40 #include "wtf/PassOwnPtr.h" 41 #include "wtf/PassOwnPtr.h"
41 #include "wtf/PassRefPtr.h" 42 #include "wtf/PassRefPtr.h"
42 #include "wtf/Uint8ClampedArray.h" 43 #include "wtf/Uint8ClampedArray.h"
43 #include "wtf/Vector.h" 44 #include "wtf/Vector.h"
44 45
45 class SkCanvas; 46 class SkCanvas;
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 Image; 52 class Image;
53 class ImageData; 53 class ImageData;
54 class IntPoint; 54 class IntPoint;
55 class IntRect; 55 class IntRect;
56 class GraphicsContext3D; 56 class GraphicsContext3D;
57 57
58 enum Multiply { 58 enum Multiply {
59 Premultiplied, 59 Premultiplied,
60 Unmultiplied 60 Unmultiplied
61 }; 61 };
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 friend class GeneratedImage; 137 friend class GeneratedImage;
138 friend class CrossfadeGeneratedImage; 138 friend class CrossfadeGeneratedImage;
139 friend class GeneratorGeneratedImage; 139 friend class GeneratorGeneratedImage;
140 friend class SkiaImageFilterBuilder; 140 friend class SkiaImageFilterBuilder;
141 141
142 IntSize m_size; 142 IntSize m_size;
143 IntSize m_logicalSize; 143 IntSize m_logicalSize;
144 float m_resolutionScale; 144 float m_resolutionScale;
145 OwnPtr<SkCanvas> m_canvas; 145 OwnPtr<SkCanvas> m_canvas;
146 OwnPtr<GraphicsContext> m_context; 146 OwnPtr<GraphicsContext> m_context;
147 OwnPtr<Canvas2DLayerBridge> m_layerBridge; 147 Canvas2DLayerBridgePtr m_layerBridge;
148 148
149 // This constructor will place its success into the given out-variable 149 // This constructor will place its success into the given out-variable
150 // so that create() knows when it should return failure. 150 // so that create() knows when it should return failure.
151 ImageBuffer(const IntSize&, float resolutionScale, RenderingMode, OpacityMod e, bool& success); 151 ImageBuffer(const IntSize&, float resolutionScale, RenderingMode, OpacityMod e, bool& success);
152 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);
153 }; 153 };
154 154
155 String ImageDataToDataURL(const ImageData&, const String& mimeType, const double * quality); 155 String ImageDataToDataURL(const ImageData&, const String& mimeType, const double * quality);
156 156
157 } // namespace WebCore 157 } // namespace WebCore
158 158
159 #endif // ImageBuffer_h 159 #endif // ImageBuffer_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698