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

Side by Side Diff: base/clipboard_win.cc

Issue 7813: Call GdiAlphaBlend directly instead of the AlphaBlend wrapper in msimg32.dll.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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 | « no previous file | base/gfx/bitmap_platform_device_win.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // Many of these functions are based on those found in 5 // Many of these functions are based on those found in
6 // webkit/port/platform/PasteboardWin.cpp 6 // webkit/port/platform/PasteboardWin.cpp
7 7
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 10
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 ::DeleteDC(source_dc); 310 ::DeleteDC(source_dc);
311 ::ReleaseDC(NULL, dc); 311 ::ReleaseDC(NULL, dc);
312 return; 312 return;
313 } 313 }
314 314
315 HBITMAP old_hbitmap = (HBITMAP)SelectObject(compatible_dc, hbitmap); 315 HBITMAP old_hbitmap = (HBITMAP)SelectObject(compatible_dc, hbitmap);
316 HBITMAP old_source = (HBITMAP)SelectObject(source_dc, source_hbitmap); 316 HBITMAP old_source = (HBITMAP)SelectObject(source_dc, source_hbitmap);
317 317
318 // Now we need to blend it into an HBITMAP we can place on the clipboard 318 // Now we need to blend it into an HBITMAP we can place on the clipboard
319 BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA}; 319 BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA};
320 ::AlphaBlend(compatible_dc, 0, 0, size.width(), size.height(), 320 ::GdiAlphaBlend(compatible_dc, 0, 0, size.width(), size.height(),
321 source_dc, 0, 0, size.width(), size.height(), bf); 321 source_dc, 0, 0, size.width(), size.height(), bf);
322 322
323 // Clean up all the handles we just opened 323 // Clean up all the handles we just opened
324 ::SelectObject(compatible_dc, old_hbitmap); 324 ::SelectObject(compatible_dc, old_hbitmap);
325 ::SelectObject(source_dc, old_source); 325 ::SelectObject(source_dc, old_source);
326 ::DeleteObject(old_hbitmap); 326 ::DeleteObject(old_hbitmap);
327 ::DeleteObject(old_source); 327 ::DeleteObject(old_source);
328 ::DeleteDC(compatible_dc); 328 ::DeleteDC(compatible_dc);
329 ::DeleteDC(source_dc); 329 ::DeleteDC(source_dc);
330 ::ReleaseDC(NULL, dc); 330 ::ReleaseDC(NULL, dc);
331 331
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 // static 695 // static
696 Clipboard::FormatType Clipboard::GetFileContentFormatZeroType() { 696 Clipboard::FormatType Clipboard::GetFileContentFormatZeroType() {
697 return ClipboardUtil::GetFileContentFormatZero()->cfFormat; 697 return ClipboardUtil::GetFileContentFormatZero()->cfFormat;
698 } 698 }
699 699
700 // static 700 // static
701 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() { 701 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() {
702 return ClipboardUtil::GetWebKitSmartPasteFormat()->cfFormat; 702 return ClipboardUtil::GetWebKitSmartPasteFormat()->cfFormat;
703 } 703 }
704 704
OLDNEW
« no previous file with comments | « no previous file | base/gfx/bitmap_platform_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698