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

Side by Side Diff: base/gfx/gdi_util.cc

Issue 1612: Implement "iframe shim" behavior for windowed plugins.... (Closed) Base URL: http://src.chromium.org/svn/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/gfx/gdi_util.h ('k') | base/gfx/native_theme.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
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_header.h" 5 #include "base/gfx/gdi_util.h"
6 6
7 namespace gfx { 7 namespace gfx {
8 8
9 void CreateBitmapHeader(int width, int height, BITMAPINFOHEADER* hdr) { 9 void CreateBitmapHeader(int width, int height, BITMAPINFOHEADER* hdr) {
10 CreateBitmapHeaderWithColorDepth(width, height, 32, hdr); 10 CreateBitmapHeaderWithColorDepth(width, height, 32, hdr);
11 } 11 }
12 12
13 void CreateBitmapHeaderWithColorDepth(int width, int height, int color_depth, 13 void CreateBitmapHeaderWithColorDepth(int width, int height, int color_depth,
14 BITMAPINFOHEADER* hdr) { 14 BITMAPINFOHEADER* hdr) {
15 // These values are shared with gfx::PlatformDevice 15 // These values are shared with gfx::PlatformDevice
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 hdr->biPlanes = 1; 53 hdr->biPlanes = 1;
54 hdr->biBitCount = 1; 54 hdr->biBitCount = 1;
55 hdr->biCompression = BI_RGB; 55 hdr->biCompression = BI_RGB;
56 hdr->biSizeImage = 0; 56 hdr->biSizeImage = 0;
57 hdr->biXPelsPerMeter = 1; 57 hdr->biXPelsPerMeter = 1;
58 hdr->biYPelsPerMeter = 1; 58 hdr->biYPelsPerMeter = 1;
59 hdr->biClrUsed = 0; 59 hdr->biClrUsed = 0;
60 hdr->biClrImportant = 0; 60 hdr->biClrImportant = 0;
61 } 61 }
62 62
63 void SubtractRectanglesFromRegion(HRGN hrgn,
64 const std::vector<gfx::Rect>& cutouts) {
65 if (cutouts.size()) {
66 HRGN cutout = ::CreateRectRgn(0, 0, 0, 0);
67 for (size_t i = 0; i < cutouts.size(); i++) {
68 ::SetRectRgn(cutout,
69 cutouts[i].x(),
70 cutouts[i].y(),
71 cutouts[i].right(),
72 cutouts[i].bottom());
73 ::CombineRgn(hrgn, hrgn, cutout, RGN_DIFF);
74 }
75 ::DeleteObject(cutout);
76 }
77 }
78
63 } // namespace gfx 79 } // namespace gfx
64 80
OLDNEW
« no previous file with comments | « base/gfx/gdi_util.h ('k') | base/gfx/native_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698