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

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

Issue 2495953002: Support uploads of sub-rectangles of canvases to 2D and 3D textures. (Closed)
Patch Set: Fixed regression in accelerated video-to-texture uploads. Marked Mac Intel failures. Created 4 years, 1 month 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void putByteArray(Multiply, 134 void putByteArray(Multiply,
135 const unsigned char* source, 135 const unsigned char* source,
136 const IntSize& sourceSize, 136 const IntSize& sourceSize,
137 const IntRect& sourceRect, 137 const IntRect& sourceRect,
138 const IntPoint& destPoint); 138 const IntPoint& destPoint);
139 139
140 AffineTransform baseTransform() const { return AffineTransform(); } 140 AffineTransform baseTransform() const { return AffineTransform(); }
141 WebLayer* platformLayer() const; 141 WebLayer* platformLayer() const;
142 142
143 // Destroys the TEXTURE_2D binding for the active texture unit of the passed 143 // Destroys the TEXTURE_2D binding for the active texture unit of the passed
144 // context. 144 // context. Assumes the destination texture has already been allocated.
145 // FIXME: Current implementations of this method only work with textures that 145 // FIXME: Current implementations of this method only work with textures that
146 // are RGB or RGBA format, UNSIGNED_BYTE type and level 0, as specified in 146 // are RGB or RGBA format, UNSIGNED_BYTE type and level 0, as specified in
147 // Extensions3D::canUseCopyTextureCHROMIUM(). 147 // Extensions3D::canUseCopyTextureCHROMIUM().
148 bool copyToPlatformTexture(gpu::gles2::GLES2Interface*, 148 bool copyToPlatformTexture(gpu::gles2::GLES2Interface*,
149 GLuint texture, 149 GLuint texture,
150 GLenum internalFormat, 150 GLenum internalFormat,
151 GLenum destType, 151 GLenum destType,
152 GLint level, 152 GLint level,
153 bool premultiplyAlpha, 153 bool premultiplyAlpha,
154 bool flipY); 154 bool flipY,
155 const IntPoint& destPoint,
156 const IntRect& sourceSubRectangle);
155 157
156 bool copyRenderingResultsFromDrawingBuffer(DrawingBuffer*, 158 bool copyRenderingResultsFromDrawingBuffer(DrawingBuffer*,
157 SourceDrawingBuffer); 159 SourceDrawingBuffer);
158 160
159 void flush(FlushReason); // Process deferred draw commands immediately. 161 void flush(FlushReason); // Process deferred draw commands immediately.
160 void flushGpu(FlushReason); // Like flush(), but flushes all the way down to 162 void flushGpu(FlushReason); // Like flush(), but flushes all the way down to
161 // the GPU context if the surface is accelerated. 163 // the GPU context if the surface is accelerated.
162 164
163 void notifySurfaceInvalid(); 165 void notifySurfaceInvalid();
164 166
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 int height() const { return m_size.height(); } 216 int height() const { return m_size.height(); }
215 int width() const { return m_size.width(); } 217 int width() const { return m_size.width(); }
216 218
217 const unsigned char* m_data; 219 const unsigned char* m_data;
218 const IntSize m_size; 220 const IntSize m_size;
219 }; 221 };
220 222
221 } // namespace blink 223 } // namespace blink
222 224
223 #endif // ImageBuffer_h 225 #endif // ImageBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698