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

Side by Side Diff: content/browser/renderer_host/sandbox_ipc_linux.cc

Issue 789583002: Updates subpixel positioning and hinting when DSF is changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GN Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/sandbox_ipc_linux.h" 5 #include "content/browser/renderer_host/sandbox_ipc_linux.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <sys/poll.h> 8 #include <sys/poll.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 return; 300 return;
301 } 301 }
302 302
303 EnsureWebKitInitialized(); 303 EnsureWebKitInitialized();
304 304
305 gfx::FontRenderParamsQuery query(true); 305 gfx::FontRenderParamsQuery query(true);
306 query.families.push_back(family); 306 query.families.push_back(family);
307 query.pixel_size = pixel_size; 307 query.pixel_size = pixel_size;
308 query.style = gfx::Font::NORMAL | 308 query.style = gfx::Font::NORMAL |
309 (bold ? gfx::Font::BOLD : 0) | (italic ? gfx::Font::ITALIC : 0); 309 (bold ? gfx::Font::BOLD : 0) | (italic ? gfx::Font::ITALIC : 0);
310 const gfx::FontRenderParams params = gfx::GetFontRenderParams(query, NULL); 310 const gfx::FontRenderParams params =
311 gfx::GetCurrentFontRenderParams(query, NULL);
311 312
312 // These are passed as ints since they're interpreted as tri-state chars in 313 // These are passed as ints since they're interpreted as tri-state chars in
313 // Blink. 314 // Blink.
314 Pickle reply; 315 Pickle reply;
315 reply.WriteInt(params.use_bitmaps); 316 reply.WriteInt(params.use_bitmaps);
316 reply.WriteInt(params.autohinter); 317 reply.WriteInt(params.autohinter);
317 reply.WriteInt(params.hinting != gfx::FontRenderParams::HINTING_NONE); 318 reply.WriteInt(params.hinting != gfx::FontRenderParams::HINTING_NONE);
318 reply.WriteInt(ConvertHinting(params.hinting)); 319 reply.WriteInt(ConvertHinting(params.hinting));
319 reply.WriteInt(params.antialiasing); 320 reply.WriteInt(params.antialiasing);
320 reply.WriteInt(ConvertSubpixelRendering(params.subpixel_rendering)); 321 reply.WriteInt(ConvertSubpixelRendering(params.subpixel_rendering));
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 454 }
454 455
455 void SandboxIPCHandler::EnsureWebKitInitialized() { 456 void SandboxIPCHandler::EnsureWebKitInitialized() {
456 if (blink_platform_impl_) 457 if (blink_platform_impl_)
457 return; 458 return;
458 blink_platform_impl_.reset(new BlinkPlatformImpl); 459 blink_platform_impl_.reset(new BlinkPlatformImpl);
459 blink::initializeWithoutV8(blink_platform_impl_.get()); 460 blink::initializeWithoutV8(blink_platform_impl_.get());
460 } 461 }
461 462
462 } // namespace content 463 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698