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

Side by Side Diff: base/gfx/bitmap_platform_device_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 | « base/clipboard_win.cc ('k') | base/gfx/vector_device.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 #include "base/gfx/bitmap_platform_device_win.h" 5 #include "base/gfx/bitmap_platform_device_win.h"
6 6
7 #include "base/gfx/gdi_util.h" 7 #include "base/gfx/gdi_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "SkMatrix.h" 10 #include "SkMatrix.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 BitBlt(dc, 369 BitBlt(dc,
370 x, 370 x,
371 y, 371 y,
372 copy_width, 372 copy_width,
373 copy_height, 373 copy_height,
374 source_dc, 374 source_dc,
375 src_rect->left, 375 src_rect->left,
376 src_rect->top, 376 src_rect->top,
377 SRCCOPY); 377 SRCCOPY);
378 } else { 378 } else {
379 DCHECK(copy_width != 0 && copy_height != 0);
379 BLENDFUNCTION blend_function = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA}; 380 BLENDFUNCTION blend_function = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA};
380 AlphaBlend(dc, 381 GdiAlphaBlend(dc,
381 x, 382 x,
382 y, 383 y,
383 copy_width, 384 copy_width,
384 copy_height, 385 copy_height,
385 source_dc, 386 source_dc,
386 src_rect->left, 387 src_rect->left,
387 src_rect->top, 388 src_rect->top,
388 copy_width, 389 copy_width,
389 copy_height, 390 copy_height,
390 blend_function); 391 blend_function);
391 } 392 }
392 LoadTransformToDC(source_dc, data_->transform()); 393 LoadTransformToDC(source_dc, data_->transform());
393 394
394 if (created_dc) 395 if (created_dc)
395 data_->ReleaseBitmapDC(); 396 data_->ReleaseBitmapDC();
396 } 397 }
397 398
398 void BitmapPlatformDeviceWin::prepareForGDI(int x, int y, int width, 399 void BitmapPlatformDeviceWin::prepareForGDI(int x, int y, int width,
399 int height) { 400 int height) {
400 processPixels<PrepareAlphaForGDI>(x, y, width, height); 401 processPixels<PrepareAlphaForGDI>(x, y, width, height);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 for (int j = 0; j < width; j++) { 462 for (int j = 0; j < width; j++) {
462 adjustor(data + j); 463 adjustor(data + j);
463 } 464 }
464 data += row_words; 465 data += row_words;
465 } 466 }
466 } 467 }
467 } 468 }
468 469
469 } // namespace gfx 470 } // namespace gfx
470 471
OLDNEW
« no previous file with comments | « base/clipboard_win.cc ('k') | base/gfx/vector_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698