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

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

Issue 9341003: Change required for rolling-in skia change being reviewed here: http://codereview.appspot.com/562... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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_win.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) 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 "skia/ext/bitmap_platform_device_win.h" 8 #include "skia/ext/bitmap_platform_device_win.h"
9 9
10 #include "skia/ext/bitmap_platform_device_data.h" 10 #include "skia/ext/bitmap_platform_device_data.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 copy_height, 240 copy_height,
241 blend_function); 241 blend_function);
242 } 242 }
243 LoadTransformToDC(source_dc, data_->transform()); 243 LoadTransformToDC(source_dc, data_->transform());
244 244
245 EndPlatformPaint(); 245 EndPlatformPaint();
246 if (created_dc) 246 if (created_dc)
247 data_->ReleaseBitmapDC(); 247 data_->ReleaseBitmapDC();
248 } 248 }
249 249
250 void BitmapPlatformDevice::onAccessBitmap(SkBitmap* bitmap) { 250 const SkBitmap& BitmapPlatformDevice::onAccessBitmap(SkBitmap* bitmap) {
251 // FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI 251 // FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI
252 // operation has occurred on our DC. 252 // operation has occurred on our DC.
253 if (data_->IsBitmapDCCreated()) 253 if (data_->IsBitmapDCCreated())
254 GdiFlush(); 254 GdiFlush();
255 return *bitmap;
255 } 256 }
256 257
257 SkDevice* BitmapPlatformDevice::onCreateCompatibleDevice( 258 SkDevice* BitmapPlatformDevice::onCreateCompatibleDevice(
258 SkBitmap::Config config, int width, int height, bool isOpaque, 259 SkBitmap::Config config, int width, int height, bool isOpaque,
259 Usage /*usage*/) { 260 Usage /*usage*/) {
260 SkASSERT(config == SkBitmap::kARGB_8888_Config); 261 SkASSERT(config == SkBitmap::kARGB_8888_Config);
261 return BitmapPlatformDevice::create(width, height, isOpaque, NULL); 262 return BitmapPlatformDevice::create(width, height, isOpaque, NULL);
262 } 263 }
263 264
264 } // namespace skia 265 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698