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

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

Issue 110353006: Roll Skia DEPS to r12910 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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 | « DEPS ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <windows.h> 5 #include <windows.h>
6 #include <psapi.h> 6 #include <psapi.h>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/debug/alias.h" 9 #include "base/debug/alias.h"
10 #include "skia/ext/bitmap_platform_device_win.h" 10 #include "skia/ext/bitmap_platform_device_win.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 return hbitmap; 118 return hbitmap;
119 } 119 }
120 120
121 PlatformBitmapPixelRef::PlatformBitmapPixelRef(const SkImageInfo& info, 121 PlatformBitmapPixelRef::PlatformBitmapPixelRef(const SkImageInfo& info,
122 HBITMAP bitmap_handle, 122 HBITMAP bitmap_handle,
123 void* pixels) 123 void* pixels)
124 : SkPixelRef(info), 124 : SkPixelRef(info),
125 bitmap_handle_(bitmap_handle), 125 bitmap_handle_(bitmap_handle),
126 pixels_(pixels) { 126 pixels_(pixels) {
127 setPreLocked(pixels, NULL); 127 setPreLocked(pixels, info.minRowBytes(), NULL);
128 } 128 }
129 129
130 PlatformBitmapPixelRef::~PlatformBitmapPixelRef() { 130 PlatformBitmapPixelRef::~PlatformBitmapPixelRef() {
131 if (bitmap_handle_) 131 if (bitmap_handle_)
132 DeleteObject(bitmap_handle_); 132 DeleteObject(bitmap_handle_);
133 } 133 }
134 134
135 void* PlatformBitmapPixelRef::onLockPixels(SkColorTable** color_table) { 135 void* PlatformBitmapPixelRef::onLockPixels(SkColorTable** color_table) {
136 *color_table = NULL; 136 *color_table = NULL;
137 return pixels_; 137 return pixels_;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 RefPtr<SkPixelRef> pixel_ref = AdoptRef(new PlatformBitmapPixelRef(info, 409 RefPtr<SkPixelRef> pixel_ref = AdoptRef(new PlatformBitmapPixelRef(info,
410 hbitmap, 410 hbitmap,
411 data)); 411 data));
412 bitmap_.setPixelRef(pixel_ref.get()); 412 bitmap_.setPixelRef(pixel_ref.get());
413 bitmap_.lockPixels(); 413 bitmap_.lockPixels();
414 414
415 return true; 415 return true;
416 } 416 }
417 417
418 } // namespace skia 418 } // namespace skia
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698