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

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

Issue 1512803004: Use refs for GraphicsContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 bool copyRenderingResultsFromDrawingBuffer(DrawingBuffer*, SourceDrawingBuff er); 122 bool copyRenderingResultsFromDrawingBuffer(DrawingBuffer*, SourceDrawingBuff er);
123 123
124 void flush(); // process deferred draw commands immediately 124 void flush(); // process deferred draw commands immediately
125 void flushGpu(); // Like flush(), but flushes all the way down to the Gpu co ntext if the surface is accelerated 125 void flushGpu(); // Like flush(), but flushes all the way down to the Gpu co ntext if the surface is accelerated
126 126
127 void notifySurfaceInvalid(); 127 void notifySurfaceInvalid();
128 128
129 PassRefPtr<SkImage> newSkImageSnapshot(AccelerationHint) const; 129 PassRefPtr<SkImage> newSkImageSnapshot(AccelerationHint) const;
130 PassRefPtr<Image> newImageSnapshot(AccelerationHint = PreferNoAcceleration) const; 130 PassRefPtr<Image> newImageSnapshot(AccelerationHint = PreferNoAcceleration) const;
131 131
132 void draw(GraphicsContext*, const FloatRect&, const FloatRect*, SkXfermode:: Mode); 132 void draw(GraphicsContext&, const FloatRect&, const FloatRect*, SkXfermode:: Mode);
133 133
134 private: 134 private:
135 ImageBuffer(PassOwnPtr<ImageBufferSurface>); 135 ImageBuffer(PassOwnPtr<ImageBufferSurface>);
136 136
137 enum SnapshotState { 137 enum SnapshotState {
138 InitialSnapshotState, 138 InitialSnapshotState,
139 DidAcquireSnapshot, 139 DidAcquireSnapshot,
140 DrawnToAfterSnapshot, 140 DrawnToAfterSnapshot,
141 }; 141 };
142 mutable SnapshotState m_snapshotState; 142 mutable SnapshotState m_snapshotState;
(...skipping 10 matching lines...) Expand all
153 int height() const { return m_size.height(); } 153 int height() const { return m_size.height(); }
154 int width() const { return m_size.width(); } 154 int width() const { return m_size.width(); }
155 155
156 const unsigned char* m_data; 156 const unsigned char* m_data;
157 const IntSize m_size; 157 const IntSize m_size;
158 }; 158 };
159 159
160 } // namespace blink 160 } // namespace blink
161 161
162 #endif // ImageBuffer_h 162 #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