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

Issue 397173003: NaCl SDK: Demonstrate use of pp::Graphics2D::SetScale() (Closed)

Created:
6 years, 5 months ago by Josh Horwich
Modified:
6 years, 5 months ago
Reviewers:
binji
CC:
chromium-reviews, binji+watch_chromium.org, Sam Clegg
Project:
chromium
Visibility:
Public.

Description

NaCl SDK: Demonstrate use of pp::Graphics2D::SetScale() Demonstrate in the NaCl SDK API demo for pp::Graphics2D how to use full device resolution on HiDPI displays. For Graphics2D, the example now calls pp::View::GetDeviceScale(), and creates a Graphics 2D context with the correct number of pixels, as well as show when to call pp::Graphics2D::SetScale(). It also scales the mouse position to the correct location and increases the radius of the circle created in DrawMouse() to match. BUG=144071, 392557 TEST=Build NaCl SDK, run with --force-device-scale-factor=2 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283832

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -4 lines) Patch
M native_client_sdk/src/examples/api/graphics_2d/graphics_2d.cc View 6 chunks +12 lines, -4 lines 2 comments Download

Messages

Total messages: 6 (0 generated)
Josh Horwich
PTAL
6 years, 5 months ago (2014-07-17 00:07:34 UTC) #1
binji
thanks, lgtm https://codereview.chromium.org/397173003/diff/1/native_client_sdk/src/examples/api/graphics_2d/graphics_2d.cc File native_client_sdk/src/examples/api/graphics_2d/graphics_2d.cc (right): https://codereview.chromium.org/397173003/diff/1/native_client_sdk/src/examples/api/graphics_2d/graphics_2d.cc#newcode192 native_client_sdk/src/examples/api/graphics_2d/graphics_2d.cc:192: int radius = kMouseRadius * device_scale_; no ...
6 years, 5 months ago (2014-07-17 00:11:38 UTC) #2
Josh Horwich
https://codereview.chromium.org/397173003/diff/1/native_client_sdk/src/examples/api/graphics_2d/graphics_2d.cc File native_client_sdk/src/examples/api/graphics_2d/graphics_2d.cc (right): https://codereview.chromium.org/397173003/diff/1/native_client_sdk/src/examples/api/graphics_2d/graphics_2d.cc#newcode192 native_client_sdk/src/examples/api/graphics_2d/graphics_2d.cc:192: int radius = kMouseRadius * device_scale_; On 2014/07/17 00:11:38, ...
6 years, 5 months ago (2014-07-17 00:20:58 UTC) #3
Josh Horwich
The CQ bit was checked by jhorwich@chromium.org
6 years, 5 months ago (2014-07-17 17:49:28 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jhorwich@chromium.org/397173003/1
6 years, 5 months ago (2014-07-17 17:50:32 UTC) #5
commit-bot: I haz the power
6 years, 5 months ago (2014-07-17 19:09:50 UTC) #6
Message was sent while issue was closed.
Change committed as 283832

Powered by Google App Engine
This is Rietveld 408576698