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

Issue 9212020: Make scoped dc objects smarter. (Closed)

Created:
8 years, 11 months ago by cpu_(ooo_6.6-7.5)
Modified:
8 years, 10 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Make scoped dc objects smarter So we don't destroy the dc with gdi objects selected. Also remove implicit conversion to HDC. BUG=110113, 113683 TEST=chrome runs, base unittests green. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=121840

Patch Set 1 : '' #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 8

Patch Set 4 : '' #

Total comments: 19

Patch Set 5 : '' #

Total comments: 1

Patch Set 6 : '' #

Total comments: 14

Patch Set 7 : '' #

Total comments: 5

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Total comments: 2

Patch Set 11 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -103 lines) Patch
M base/base.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M base/win/scoped_hdc.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +67 lines, -45 lines 0 comments Download
A base/win/scoped_hdc.cc View 1 2 3 4 5 6 7 8 1 chunk +116 lines, -0 lines 0 comments Download
A base/win/scoped_hdc_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +88 lines, -0 lines 0 comments Download
M chrome/browser/aeropeek_manager.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/window_snapshot/window_snapshot_win.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -19 lines 0 comments Download
M chrome/renderer/print_web_view_helper_win.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/service/cloud_print/print_system_win.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +15 lines, -16 lines 0 comments Download
M printing/emf_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -4 lines 0 comments Download
M remoting/host/disconnect_window_win.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/native_theme_win.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +11 lines, -7 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
cpu_(ooo_6.6-7.5)
8 years, 11 months ago (2012-01-20 21:13:34 UTC) #1
Peter Kasting
http://codereview.chromium.org/9212020/diff/13001/base/win/scoped_hdc.h File base/win/scoped_hdc.h (right): http://codereview.chromium.org/9212020/diff/13001/base/win/scoped_hdc.h#newcode18 base/win/scoped_hdc.h:18: // that are initially selected into a DC. It ...
8 years, 11 months ago (2012-01-20 21:48:12 UTC) #2
cpu_(ooo_6.6-7.5)
http://codereview.chromium.org/9212020/diff/13001/base/win/scoped_hdc.h File base/win/scoped_hdc.h (right): http://codereview.chromium.org/9212020/diff/13001/base/win/scoped_hdc.h#newcode85 base/win/scoped_hdc.h:85: static_cast<Derived*>(this)->DisposeDC(hdc_); Because the client code does not treat them ...
8 years, 11 months ago (2012-01-20 23:50:59 UTC) #3
cpu_(ooo_6.6-7.5)
changes made on the other nits. PTAL. http://codereview.chromium.org/9212020/diff/13001/base/win/scoped_hdc_unittest.cc File base/win/scoped_hdc_unittest.cc (right): http://codereview.chromium.org/9212020/diff/13001/base/win/scoped_hdc_unittest.cc#newcode34 base/win/scoped_hdc_unittest.cc:34: return NULL ...
8 years, 11 months ago (2012-01-20 23:53:55 UTC) #4
Peter Kasting
We argued some about this at TGIF and I still really would prefer the virtual ...
8 years, 11 months ago (2012-01-21 01:00:25 UTC) #5
Peter Kasting
On 2012/01/20 23:50:59, cpu wrote: > For a few minutes I did consider touching the ...
8 years, 11 months ago (2012-01-21 01:01:51 UTC) #6
Derek Bruening
http://codereview.chromium.org/9212020/diff/17003/base/win/scoped_hdc.h File base/win/scoped_hdc.h (right): http://codereview.chromium.org/9212020/diff/17003/base/win/scoped_hdc.h#newcode34 base/win/scoped_hdc.h:34: // But why work so hard? use our handy ...
8 years, 11 months ago (2012-01-21 02:30:49 UTC) #7
cpu_(ooo_6.6-7.5)
Code updated. I am looking at the code to see what bug I should file ...
8 years, 11 months ago (2012-01-24 04:48:04 UTC) #8
Derek Bruening
http://codereview.chromium.org/9212020/diff/17003/base/win/scoped_hdc.h File base/win/scoped_hdc.h (right): http://codereview.chromium.org/9212020/diff/17003/base/win/scoped_hdc.h#newcode38 base/win/scoped_hdc.h:38: // .. drawing here On 2012/01/24 04:48:04, cpu wrote: ...
8 years, 11 months ago (2012-01-24 18:49:43 UTC) #9
Peter Kasting
I like the idea of killing operator HDC() if possible. If we must we could ...
8 years, 11 months ago (2012-01-24 21:03:25 UTC) #10
cpu_(ooo_6.6-7.5)
Removed evil implicit conversion to HDC. Please look again. The try bots are taking forever ...
8 years, 10 months ago (2012-02-08 00:03:20 UTC) #11
Peter Kasting
Can you make sure there's a bug somewhere on killing the Set() accessor so that ...
8 years, 10 months ago (2012-02-08 00:38:48 UTC) #12
Derek Bruening
LGTM http://codereview.chromium.org/9212020/diff/27001/base/win/scoped_hdc.h File base/win/scoped_hdc.h (right): http://codereview.chromium.org/9212020/diff/27001/base/win/scoped_hdc.h#newcode130 base/win/scoped_hdc.h:130: // Creates and manages a HDC obtained by ...
8 years, 10 months ago (2012-02-08 15:13:19 UTC) #13
cpu_(ooo_6.6-7.5)
I think I got all the comments done. PTAL See CL description for the new ...
8 years, 10 months ago (2012-02-10 19:41:55 UTC) #14
Peter Kasting
LGTM http://codereview.chromium.org/9212020/diff/37001/base/base.gypi File base/base.gypi (right): http://codereview.chromium.org/9212020/diff/37001/base/base.gypi#newcode407 base/base.gypi:407: 'win/scoped_hdc.cc', Nit: tabs vs. spaces or something went ...
8 years, 10 months ago (2012-02-10 19:47:38 UTC) #15
Derek Bruening
LGTM
8 years, 10 months ago (2012-02-10 20:09:46 UTC) #16
brettw
LGTM http://codereview.chromium.org/9212020/diff/39016/base/win/scoped_hdc_unittest.cc File base/win/scoped_hdc_unittest.cc (right): http://codereview.chromium.org/9212020/diff/39016/base/win/scoped_hdc_unittest.cc#newcode12 base/win/scoped_hdc_unittest.cc:12: namespace { Move the extra blank line above ...
8 years, 10 months ago (2012-02-13 04:24:28 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cpu@chromium.org/9212020/45001
8 years, 10 months ago (2012-02-14 01:03:37 UTC) #18
commit-bot: I haz the power
8 years, 10 months ago (2012-02-14 01:03:45 UTC) #19
Presubmit check for 9212020-45001 failed and returned exit status 1.

Running presubmit commit checks ...

** Presubmit ERRORS **
Missing LGTM from an OWNER for:
ui/gfx/native_theme_win.cc,remoting/host/disconnect_window_win.cc,printing/emf_win_unittest.cc

Presubmit checks took 3.1s to calculate.

Powered by Google App Engine
This is Rietveld 408576698