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

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

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/platform_canvas.h ('k') | no next file » | 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 #include "skia/ext/platform_canvas.h" 5 #include "skia/ext/platform_canvas.h"
6 6
7 #include "skia/ext/bitmap_platform_device.h" 7 #include "skia/ext/bitmap_platform_device.h"
8 #include "third_party/skia/include/core/SkTypes.h" 8 #include "third_party/skia/include/core/SkTypes.h"
9 9
10 namespace skia { 10 namespace skia {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 rect.setXYWH(SkIntToScalar(x), SkIntToScalar(y), 80 rect.setXYWH(SkIntToScalar(x), SkIntToScalar(y),
81 SkIntToScalar(width), SkIntToScalar(height)); 81 SkIntToScalar(width), SkIntToScalar(height));
82 SkPaint paint; 82 SkPaint paint;
83 // so we don't draw anything on a device that ignores xfermodes 83 // so we don't draw anything on a device that ignores xfermodes
84 paint.setColor(0); 84 paint.setColor(0);
85 // install our custom mode 85 // install our custom mode
86 paint.setXfermode(new SkProcXfermode(MakeOpaqueXfermodeProc))->unref(); 86 paint.setXfermode(new SkProcXfermode(MakeOpaqueXfermodeProc))->unref();
87 canvas->drawRect(rect, paint); 87 canvas->drawRect(rect, paint);
88 } 88 }
89 89
90 PlatformBitmap::PlatformBitmap() : surface_(0) {} 90 PlatformBitmap::PlatformBitmap() : surface_(0), platform_extra_(0) {}
91 91
92 } // namespace skia 92 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/platform_canvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698