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

Side by Side Diff: skia/ext/platform_canvas.h

Issue 11293036: Free the dibsection (HBITMAP) in PlatformBitmap's destructor, so we don't leak! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | skia/ext/platform_canvas.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SKIA_EXT_PLATFORM_CANVAS_H_ 5 #ifndef SKIA_EXT_PLATFORM_CANVAS_H_
6 #define SKIA_EXT_PLATFORM_CANVAS_H_ 6 #define SKIA_EXT_PLATFORM_CANVAS_H_
7 7
8 // The platform-specific device will include the necessary platform headers 8 // The platform-specific device will include the necessary platform headers
9 // to get the surface type. 9 // to get the surface type.
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 // Returns the platform surface, or 0 if Allocate() did not return true. 163 // Returns the platform surface, or 0 if Allocate() did not return true.
164 PlatformSurface GetSurface() { return surface_; } 164 PlatformSurface GetSurface() { return surface_; }
165 165
166 // Return the skia bitmap, which will be empty if Allocate() did not 166 // Return the skia bitmap, which will be empty if Allocate() did not
167 // return true. 167 // return true.
168 const SkBitmap& GetBitmap() { return bitmap_; } 168 const SkBitmap& GetBitmap() { return bitmap_; }
169 169
170 private: 170 private:
171 SkBitmap bitmap_; 171 SkBitmap bitmap_;
172 PlatformSurface surface_; 172 PlatformSurface surface_; // initialized to 0
173 intptr_t platform_extra_; // initialized to 0, specific to each platform
173 174
174 DISALLOW_COPY_AND_ASSIGN(PlatformBitmap); 175 DISALLOW_COPY_AND_ASSIGN(PlatformBitmap);
175 }; 176 };
176 177
177 } // namespace skia 178 } // namespace skia
178 179
179 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ 180 #endif // SKIA_EXT_PLATFORM_CANVAS_H_
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | skia/ext/platform_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698