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

Side by Side Diff: Source/web/PageWidgetDelegate.cpp

Issue 407553002: [Linux] Enable subpixel text on high-dpi regardless of hinting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase w/head Created 6 years, 5 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 | « Source/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 page->animator().updateLayoutAndStyleForPainting(rootFrame); 83 page->animator().updateLayoutAndStyleForPainting(rootFrame);
84 } 84 }
85 85
86 void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background) 86 void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background)
87 { 87 {
88 if (rect.isEmpty()) 88 if (rect.isEmpty())
89 return; 89 return;
90 GraphicsContext gc(canvas); 90 GraphicsContext gc(canvas);
91 gc.setCertainlyOpaque(background == Opaque); 91 gc.setCertainlyOpaque(background == Opaque);
92 gc.applyDeviceScaleFactor(page->deviceScaleFactor()); 92 gc.applyDeviceScaleFactor(page->deviceScaleFactor());
93 gc.setUseHighResMarkers(page->deviceScaleFactor() > 1.5f); 93 gc.setDeviceScaleFactor(page->deviceScaleFactor());
94 IntRect dirtyRect(rect); 94 IntRect dirtyRect(rect);
95 gc.save(); // Needed to save the canvas, not the GraphicsContext. 95 gc.save(); // Needed to save the canvas, not the GraphicsContext.
96 FrameView* view = mainFrameView(page); 96 FrameView* view = mainFrameView(page);
97 // FIXME: Can we remove the mainFrame()->document() check? 97 // FIXME: Can we remove the mainFrame()->document() check?
98 if (view && page->deprecatedLocalMainFrame()->document()) { 98 if (view && page->deprecatedLocalMainFrame()->document()) {
99 gc.clip(dirtyRect); 99 gc.clip(dirtyRect);
100 view->paint(&gc, dirtyRect); 100 view->paint(&gc, dirtyRect);
101 if (overlays) 101 if (overlays)
102 overlays->paintWebFrame(gc); 102 overlays->paintWebFrame(gc);
103 } else { 103 } else {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 { 212 {
213 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m ainFrame.view(), event)); 213 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m ainFrame.view(), event));
214 } 214 }
215 215
216 bool PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFrame, const WebTo uchEvent& event) 216 bool PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFrame, const WebTo uchEvent& event)
217 { 217 {
218 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m ainFrame.view(), event)); 218 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m ainFrame.view(), event));
219 } 219 }
220 220
221 } 221 }
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698