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

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

Issue 1497683002: Make platform/graphics to use USING_FAST_MALLOC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 InitialSnapshotState, 142 InitialSnapshotState,
143 DidAcquireSnapshot, 143 DidAcquireSnapshot,
144 DrawnToAfterSnapshot, 144 DrawnToAfterSnapshot,
145 }; 145 };
146 mutable SnapshotState m_snapshotState; 146 mutable SnapshotState m_snapshotState;
147 OwnPtr<ImageBufferSurface> m_surface; 147 OwnPtr<ImageBufferSurface> m_surface;
148 ImageBufferClient* m_client; 148 ImageBufferClient* m_client;
149 }; 149 };
150 150
151 struct ImageDataBuffer { 151 struct ImageDataBuffer {
152 STACK_ALLOCATED();
152 ImageDataBuffer(const IntSize& size, const unsigned char* data) : m_data(dat a), m_size(size) { } 153 ImageDataBuffer(const IntSize& size, const unsigned char* data) : m_data(dat a), m_size(size) { }
153 String PLATFORM_EXPORT toDataURL(const String& mimeType, const double& quali ty) const; 154 String PLATFORM_EXPORT toDataURL(const String& mimeType, const double& quali ty) const;
154 bool PLATFORM_EXPORT encodeImage(const String& mimeType, const double& quali ty, Vector<unsigned char>* encodedImage) const; 155 bool PLATFORM_EXPORT encodeImage(const String& mimeType, const double& quali ty, Vector<unsigned char>* encodedImage) const;
155 const unsigned char* pixels() const { return m_data; } 156 const unsigned char* pixels() const { return m_data; }
156 int height() const { return m_size.height(); } 157 int height() const { return m_size.height(); }
157 int width() const { return m_size.width(); } 158 int width() const { return m_size.width(); }
158 159
159 const unsigned char* m_data; 160 const unsigned char* m_data;
160 const IntSize m_size; 161 const IntSize m_size;
161 }; 162 };
162 163
163 } // namespace blink 164 } // namespace blink
164 165
165 #endif // ImageBuffer_h 166 #endif // ImageBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698