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

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

Issue 363933002: setConfig is deprecated, use setInfo or allocPixels instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « skia/ext/bitmap_platform_device_skia.cc ('k') | skia/ext/pixel_ref_utils_unittest.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) 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/debug/gdi_debug_util_win.h" 8 #include "base/debug/gdi_debug_util_win.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "skia/ext/bitmap_platform_device_win.h" 10 #include "skia/ext/bitmap_platform_device_win.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 const SkBitmap& BitmapPlatformDevice::onAccessBitmap() { 265 const SkBitmap& BitmapPlatformDevice::onAccessBitmap() {
266 // FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI 266 // FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI
267 // operation has occurred on our DC. 267 // operation has occurred on our DC.
268 if (IsBitmapDCCreated()) 268 if (IsBitmapDCCreated())
269 GdiFlush(); 269 GdiFlush();
270 return SkBitmapDevice::onAccessBitmap(); 270 return SkBitmapDevice::onAccessBitmap();
271 } 271 }
272 272
273 SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const SkImageInfo& info, 273 SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const SkImageInfo& info,
274 Usage /*usage*/) { 274 Usage /*usage*/) {
275 SkASSERT(info.colorType() == kPMColor_SkColorType); 275 SkASSERT(info.colorType() == kN32_SkColorType);
276 return BitmapPlatformDevice::CreateAndClear(info.width(), info.height(), 276 return BitmapPlatformDevice::CreateAndClear(info.width(), info.height(),
277 info.isOpaque()); 277 info.isOpaque());
278 } 278 }
279 279
280 // PlatformCanvas impl 280 // PlatformCanvas impl
281 281
282 SkCanvas* CreatePlatformCanvas(int width, 282 SkCanvas* CreatePlatformCanvas(int width,
283 int height, 283 int height,
284 bool is_opaque, 284 bool is_opaque,
285 HANDLE shared_section, 285 HANDLE shared_section,
(...skipping 28 matching lines...) Expand all
314 platform_extra_ = reinterpret_cast<intptr_t>(stock_bitmap); 314 platform_extra_ = reinterpret_cast<intptr_t>(stock_bitmap);
315 315
316 if (!InstallHBitmapPixels(&bitmap_, width, height, is_opaque, data, hbitmap)) 316 if (!InstallHBitmapPixels(&bitmap_, width, height, is_opaque, data, hbitmap))
317 return false; 317 return false;
318 bitmap_.lockPixels(); 318 bitmap_.lockPixels();
319 319
320 return true; 320 return true;
321 } 321 }
322 322
323 } // namespace skia 323 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_skia.cc ('k') | skia/ext/pixel_ref_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698