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

Side by Side Diff: ui/gfx/screen_compatible_dc_win.h

Issue 9323011: Cache a screen compatible DC to avoid re-creating it excessively. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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 | « ui/gfx/render_text_win.cc ('k') | ui/gfx/screen_compatible_dc_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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_GFX_SCREEN_COMPATIBLE_DC_WIN_H_
6 #define UI_GFX_SCREEN_COMPATIBLE_DC_WIN_H_
7 #pragma once
8
9 #include <windows.h>
10
11 #include "base/basictypes.h"
12
13 namespace gfx {
14
15 // Temporary device context that is compatible with the screen. Can be used for
16 // short-lived operations on the UI threads.
17 class ScopedTemporaryScreenCompatibleDC {
18 public:
19 ScopedTemporaryScreenCompatibleDC();
20 ~ScopedTemporaryScreenCompatibleDC();
21
22 HDC get() const { return hdc_; }
23
24 private:
25 HDC hdc_;
26
27 DISALLOW_COPY_AND_ASSIGN(ScopedTemporaryScreenCompatibleDC);
28 };
29
30 } // namespace gfx
31
32 #endif // UI_GFX_SCREEN_COMPATIBLE_DC_WIN_H_
OLDNEW
« no previous file with comments | « ui/gfx/render_text_win.cc ('k') | ui/gfx/screen_compatible_dc_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698