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

Unified Diff: ui/gfx/render_text_win.cc

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, 11 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 | ui/gfx/screen_compatible_dc_win.h » ('j') | ui/gfx/screen_compatible_dc_win.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_win.cc
===================================================================
--- ui/gfx/render_text_win.cc (revision 120360)
+++ ui/gfx/render_text_win.cc (working copy)
@@ -11,7 +11,7 @@
#include "base/stl_util.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "base/win/scoped_hdc.h"
+#include "ui/gfx/screen_compatible_dc_win.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/canvas_skia.h"
#include "ui/gfx/platform_font.h"
@@ -595,7 +595,7 @@
void RenderTextWin::LayoutVisualText() {
HRESULT hr = E_FAIL;
- base::win::ScopedCreateDC hdc(CreateCompatibleDC(NULL));
+ ScopedTemporaryScreenCompatibleDC hdc;
std::vector<internal::TextRun*>::const_iterator run_iter;
for (run_iter = runs_.begin(); run_iter < runs_.end(); ++run_iter) {
internal::TextRun* run = *run_iter;
« no previous file with comments | « no previous file | ui/gfx/screen_compatible_dc_win.h » ('j') | ui/gfx/screen_compatible_dc_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698