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

Issue 10941017: Change the scale factor of texture_size from the layer's one to an estimation. (Closed)

Created:
8 years, 3 months ago by Jun Mukai
Modified:
8 years, 3 months ago
Reviewers:
oshima, sky, piman
CC:
chromium-reviews, Ian Vollick, piman+watch_chromium.org, jonathan.backer
Visibility:
Public.

Description

Change the scale factor of texture_size from the layer's one to an estimation. The phantom window appearing in a different DPI device could be wrongly scaled without doing this, since the original texture is calculated in the original DPI but rendered in another display. BUG=145968 TEST=run chromeos-chrome with --aura-host-window-size='0+0-500x500,600+0-500x500*2' --force-compositing-mode on linux, open a web page, and drag the window across the screens. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=158099

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix comments #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Total comments: 2

Patch Set 5 : Introduce device_scale_factor to ui::Texture #

Total comments: 2

Patch Set 6 : #

Total comments: 2

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -15 lines) Patch
M content/browser/renderer_host/image_transport_factory.h View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/image_transport_factory.cc View 1 2 3 4 5 4 chunks +12 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 4 chunks +6 lines, -2 lines 0 comments Download
M ui/aura/bench/bench_main.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 4 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Jun Mukai
8 years, 3 months ago (2012-09-18 20:17:40 UTC) #1
oshima
piman should review this. (thank you for fixing this anyway!) http://codereview.chromium.org/10941017/diff/1/ui/compositor/layer.cc File ui/compositor/layer.cc (right): http://codereview.chromium.org/10941017/diff/1/ui/compositor/layer.cc#newcode760 ...
8 years, 3 months ago (2012-09-18 21:20:45 UTC) #2
oshima
mukai-san, can you add unit test for this? (layer_unittest.cc) On 2012/09/18 21:20:45, oshima wrote: > ...
8 years, 3 months ago (2012-09-19 01:54:17 UTC) #3
Jun Mukai
http://codereview.chromium.org/10941017/diff/1/ui/compositor/layer.cc File ui/compositor/layer.cc (right): http://codereview.chromium.org/10941017/diff/1/ui/compositor/layer.cc#newcode760 ui/compositor/layer.cc:760: // estimate the scale factor from the size of ...
8 years, 3 months ago (2012-09-19 19:26:56 UTC) #4
Jun Mukai
On 2012/09/19 01:54:17, oshima wrote: > mukai-san, can you add unit test for this? (layer_unittest.cc) ...
8 years, 3 months ago (2012-09-19 19:29:54 UTC) #5
oshima
On 2012/09/19 19:29:54, Jun Mukai wrote: > On 2012/09/19 01:54:17, oshima wrote: > > mukai-san, ...
8 years, 3 months ago (2012-09-19 19:55:53 UTC) #6
oshima
On 2012/09/19 19:55:53, oshima wrote: > On 2012/09/19 19:29:54, Jun Mukai wrote: > > On ...
8 years, 3 months ago (2012-09-19 19:56:37 UTC) #7
piman
http://codereview.chromium.org/10941017/diff/6001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): http://codereview.chromium.org/10941017/diff/6001/ui/compositor/layer.cc#newcode762 ui/compositor/layer.cc:762: static_cast<float>(bounds().width()) / texture_->size().width(); This will entirely defeat the purpose ...
8 years, 3 months ago (2012-09-19 23:08:48 UTC) #8
Jun Mukai
http://codereview.chromium.org/10941017/diff/6001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): http://codereview.chromium.org/10941017/diff/6001/ui/compositor/layer.cc#newcode762 ui/compositor/layer.cc:762: static_cast<float>(bounds().width()) / texture_->size().width(); On 2012/09/19 23:08:48, piman wrote: > ...
8 years, 3 months ago (2012-09-20 22:00:31 UTC) #9
piman
http://codereview.chromium.org/10941017/diff/10001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): http://codereview.chromium.org/10941017/diff/10001/ui/compositor/layer.cc#newcode383 ui/compositor/layer.cc:383: device_scale_factor_for_texture_ = device_scale_factor_; mmh, that may solve the problem ...
8 years, 3 months ago (2012-09-20 23:20:06 UTC) #10
Jun Mukai
http://codereview.chromium.org/10941017/diff/10001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): http://codereview.chromium.org/10941017/diff/10001/ui/compositor/layer.cc#newcode383 ui/compositor/layer.cc:383: device_scale_factor_for_texture_ = device_scale_factor_; On 2012/09/20 23:20:07, piman wrote: > ...
8 years, 3 months ago (2012-09-21 00:53:55 UTC) #11
piman
http://codereview.chromium.org/10941017/diff/11003/content/browser/renderer_host/image_transport_factory.h File content/browser/renderer_host/image_transport_factory.h (right): http://codereview.chromium.org/10941017/diff/11003/content/browser/renderer_host/image_transport_factory.h#newcode93 content/browser/renderer_host/image_transport_factory.h:93: virtual void SetDeviceScaleFactor(float device_scale_factor) = 0; Because ImageTransportFactory is ...
8 years, 3 months ago (2012-09-21 00:59:34 UTC) #12
Jun Mukai
http://codereview.chromium.org/10941017/diff/11003/content/browser/renderer_host/image_transport_factory.h File content/browser/renderer_host/image_transport_factory.h (right): http://codereview.chromium.org/10941017/diff/11003/content/browser/renderer_host/image_transport_factory.h#newcode93 content/browser/renderer_host/image_transport_factory.h:93: virtual void SetDeviceScaleFactor(float device_scale_factor) = 0; On 2012/09/21 00:59:34, ...
8 years, 3 months ago (2012-09-21 02:28:52 UTC) #13
piman
lgtm
8 years, 3 months ago (2012-09-21 03:56:55 UTC) #14
oshima
http://codereview.chromium.org/10941017/diff/13002/content/browser/renderer_host/render_widget_host_view_aura.h File content/browser/renderer_host/render_widget_host_view_aura.h (right): http://codereview.chromium.org/10941017/diff/13002/content/browser/renderer_host/render_widget_host_view_aura.h#newcode327 content/browser/renderer_host/render_widget_host_view_aura.h:327: // The scale factor of the device. nit: .. ...
8 years, 3 months ago (2012-09-21 04:32:04 UTC) #15
Jun Mukai
http://codereview.chromium.org/10941017/diff/13002/content/browser/renderer_host/render_widget_host_view_aura.h File content/browser/renderer_host/render_widget_host_view_aura.h (right): http://codereview.chromium.org/10941017/diff/13002/content/browser/renderer_host/render_widget_host_view_aura.h#newcode327 content/browser/renderer_host/render_widget_host_view_aura.h:327: // The scale factor of the device. On 2012/09/21 ...
8 years, 3 months ago (2012-09-21 18:25:47 UTC) #16
Jun Mukai
sky, can you take a look at this as the OWNER?
8 years, 3 months ago (2012-09-21 19:12:01 UTC) #17
sky
LGTM
8 years, 3 months ago (2012-09-21 20:24:48 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/10941017/19002
8 years, 3 months ago (2012-09-21 20:36:46 UTC) #19
commit-bot: I haz the power
8 years, 3 months ago (2012-09-21 22:33:27 UTC) #20
Change committed as 158099

Powered by Google App Engine
This is Rietveld 408576698