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

Side by Side Diff: ui/compositor/layer.cc

Issue 10332077: Zoom the web contents 2x such that they are blurry in High DPI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nicer patch Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 0, device_scale_factor_, 0, 550 0, device_scale_factor_, 0,
551 0, 0, 1); 551 0, 0, 1);
552 // Start with the inverse matrix of above. 552 // Start with the inverse matrix of above.
553 Transform transform; 553 Transform transform;
554 transform.matrix().set3x3(1.0f / device_scale_factor_, 0, 0, 554 transform.matrix().set3x3(1.0f / device_scale_factor_, 0, 0,
555 0, 1.0f / device_scale_factor_, 0, 555 0, 1.0f / device_scale_factor_, 0,
556 0, 0, 1); 556 0, 0, 1);
557 transform.ConcatTransform(transform_); 557 transform.ConcatTransform(transform_);
558 transform.ConcatTranslate(bounds_.x(), bounds_.y()); 558 transform.ConcatTranslate(bounds_.x(), bounds_.y());
559 transform.ConcatTransform(scale_translate); 559 transform.ConcatTransform(scale_translate);
560
561 if (texture_)
562 transform.ConcatScale(device_scale_factor_, device_scale_factor_);
oshima 2012/05/09 19:57:21 move this before ConcatTransform(scale_translate);
563
560 web_layer_.setTransform(transform.matrix()); 564 web_layer_.setTransform(transform.matrix());
561 } else { 565 } else {
562 Transform t = transform_; 566 Transform t = transform_;
563 t.ConcatTranslate(bounds_.x(), bounds_.y()); 567 t.ConcatTranslate(bounds_.x(), bounds_.y());
564 web_layer_.setTransform(t.matrix()); 568 web_layer_.setTransform(t.matrix());
565 } 569 }
566 } 570 }
567 571
568 void Layer::RecomputeDrawsContentAndUVRect() { 572 void Layer::RecomputeDrawsContentAndUVRect() {
569 DCHECK(!web_layer_.isNull()); 573 DCHECK(!web_layer_.isNull());
(...skipping 27 matching lines...) Expand all
597 return; 601 return;
598 unsigned int color = 0xFF000000; 602 unsigned int color = 0xFF000000;
599 color |= web_layer_is_accelerated_ ? 0x0000FF00 : 0x00FF0000; 603 color |= web_layer_is_accelerated_ ? 0x0000FF00 : 0x00FF0000;
600 bool opaque = fills_bounds_opaquely_ && (GetCombinedOpacity() == 1.f); 604 bool opaque = fills_bounds_opaquely_ && (GetCombinedOpacity() == 1.f);
601 if (!opaque) 605 if (!opaque)
602 color |= 0xFF; 606 color |= 0xFF;
603 web_layer_.setDebugBorderColor(color); 607 web_layer_.setDebugBorderColor(color);
604 } 608 }
605 609
606 } // namespace ui 610 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698