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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ImageBuffer.h

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix CanvasRenderingContext2D::createPattern crash for #40 Created 4 years, 11 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 27 matching lines...) Expand all
38 #include "platform/transforms/AffineTransform.h" 38 #include "platform/transforms/AffineTransform.h"
39 #include "third_party/skia/include/core/SkPaint.h" 39 #include "third_party/skia/include/core/SkPaint.h"
40 #include "wtf/Forward.h" 40 #include "wtf/Forward.h"
41 #include "wtf/OwnPtr.h" 41 #include "wtf/OwnPtr.h"
42 #include "wtf/PassOwnPtr.h" 42 #include "wtf/PassOwnPtr.h"
43 #include "wtf/PassRefPtr.h" 43 #include "wtf/PassRefPtr.h"
44 #include "wtf/Uint8ClampedArray.h" 44 #include "wtf/Uint8ClampedArray.h"
45 #include "wtf/Vector.h" 45 #include "wtf/Vector.h"
46 #include "wtf/text/WTFString.h" 46 #include "wtf/text/WTFString.h"
47 47
48 class SkColorFilter;
49
48 namespace WTF { 50 namespace WTF {
49 51
50 class ArrayBufferContents; 52 class ArrayBufferContents;
51 53
52 } // namespace WTF 54 } // namespace WTF
53 55
54 namespace blink { 56 namespace blink {
55 57
56 class DrawingBuffer; 58 class DrawingBuffer;
57 class GraphicsContext; 59 class GraphicsContext;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 bool copyRenderingResultsFromDrawingBuffer(DrawingBuffer*, SourceDrawingBuff er); 125 bool copyRenderingResultsFromDrawingBuffer(DrawingBuffer*, SourceDrawingBuff er);
124 126
125 void flush(); // process deferred draw commands immediately 127 void flush(); // process deferred draw commands immediately
126 void flushGpu(); // Like flush(), but flushes all the way down to the Gpu co ntext if the surface is accelerated 128 void flushGpu(); // Like flush(), but flushes all the way down to the Gpu co ntext if the surface is accelerated
127 129
128 void notifySurfaceInvalid(); 130 void notifySurfaceInvalid();
129 131
130 PassRefPtr<SkImage> newSkImageSnapshot(AccelerationHint) const; 132 PassRefPtr<SkImage> newSkImageSnapshot(AccelerationHint) const;
131 PassRefPtr<Image> newImageSnapshot(AccelerationHint = PreferNoAcceleration) const; 133 PassRefPtr<Image> newImageSnapshot(AccelerationHint = PreferNoAcceleration) const;
132 134
133 void draw(GraphicsContext&, const FloatRect&, const FloatRect*, SkXfermode:: Mode); 135 void draw(GraphicsContext&, const FloatRect&, const FloatRect*, SkXfermode:: Mode, SkColorFilter* transform);
134 136
135 void updateGPUMemoryUsage() const; 137 void updateGPUMemoryUsage() const;
136 static intptr_t getGlobalGPUMemoryUsage() { return s_globalGPUMemoryUsage; } 138 static intptr_t getGlobalGPUMemoryUsage() { return s_globalGPUMemoryUsage; }
137 intptr_t getGPUMemoryUsage() { return m_gpuMemoryUsage; } 139 intptr_t getGPUMemoryUsage() { return m_gpuMemoryUsage; }
138 140
139 protected: 141 protected:
140 ImageBuffer(PassOwnPtr<ImageBufferSurface>); 142 ImageBuffer(PassOwnPtr<ImageBufferSurface>);
141 143
142 private: 144 private:
143 enum SnapshotState { 145 enum SnapshotState {
(...skipping 18 matching lines...) Expand all
162 int height() const { return m_size.height(); } 164 int height() const { return m_size.height(); }
163 int width() const { return m_size.width(); } 165 int width() const { return m_size.width(); }
164 166
165 const unsigned char* m_data; 167 const unsigned char* m_data;
166 const IntSize m_size; 168 const IntSize m_size;
167 }; 169 };
168 170
169 } // namespace blink 171 } // namespace blink
170 172
171 #endif // ImageBuffer_h 173 #endif // ImageBuffer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.cpp ('k') | third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698