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

Unified Diff: media/video/capture/screen/screen_capturer_win.cc

Issue 13852007: Fix Clang errors in the Windows screen capture code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/screen/screen_capturer_win.cc
diff --git a/media/video/capture/screen/screen_capturer_win.cc b/media/video/capture/screen/screen_capturer_win.cc
index 3fc02a42c7fbb2b46d498262201b4b982f607854..21b8ad062b8af1cf5fa872d5a3473ad3ebf42839 100644
--- a/media/video/capture/screen/screen_capturer_win.cc
+++ b/media/video/capture/screen/screen_capturer_win.cc
@@ -217,7 +217,7 @@ ScreenCapturerWin::ScreenCapturerWin(bool disable_aero)
}
if (dwmapi_library_.is_valid() && composition_func_ == NULL) {
- composition_func_ = static_cast<DwmEnableCompositionFunc>(
+ composition_func_ = reinterpret_cast<DwmEnableCompositionFunc>(
dwmapi_library_.GetFunctionPointer("DwmEnableComposition"));
}
}
@@ -542,25 +542,25 @@ void ScreenCapturerWin::CaptureCursor() {
for (int x = 0; x < width; x++) {
int byte = y * row_bytes + x / 8;
int bit = 7 - x % 8;
- int and = and_mask[byte] & (1 << bit);
- int xor = xor_mask[byte] & (1 << bit);
+ int and_ = and_mask[byte] & (1 << bit);
+ int xor_ = xor_mask[byte] & (1 << bit);
alexeypa (please no reviews) 2013/04/18 18:56:03 Could you please name them |and_bit| and |xor_bit|
Reid Kleckner 2013/04/18 19:01:37 Done.
// The two cursor masks combine as follows:
- // AND XOR Windows Result Our result RGB Alpha
+ // and_ xor_ Windows Result Our result RGB Alpha
alexeypa (please no reviews) 2013/04/18 18:56:03 This is a comment, so I don't think Clang cares ab
Reid Kleckner 2013/04/18 19:01:37 Oops, yeah that was totally unintented. :)
// 0 0 Black Black 00 ff
// 0 1 White White ff ff
// 1 0 Screen Transparent 00 00
// 1 1 Reverse-screen Black 00 ff
- // Since we don't support XOR cursors, we replace the "Reverse Screen"
+ // Since we don't support xor_ cursors, we replace the "Reverse Screen"
alexeypa (please no reviews) 2013/04/18 18:56:03 Same as above.
// with black. In this case, we also add an outline around the cursor
// so that it is visible against a dark background.
- int rgb = (!and && xor) ? 0xff : 0x00;
- int alpha = (and && !xor) ? 0x00 : 0xff;
+ int rgb = (!and_ && xor_) ? 0xff : 0x00;
+ int alpha = (and_ && !xor_) ? 0x00 : 0xff;
*dst++ = rgb;
*dst++ = rgb;
*dst++ = rgb;
*dst++ = alpha;
- if (and && xor) {
+ if (and_ && xor_) {
add_outline = true;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698