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

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

Issue 315393002: Record SkPicture with correct LCD text setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated unittests Created 6 years, 6 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 if (layer_mask_) 629 if (layer_mask_)
630 layer_mask_->OnDeviceScaleFactorChanged(device_scale_factor); 630 layer_mask_->OnDeviceScaleFactorChanged(device_scale_factor);
631 } 631 }
632 632
633 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { 633 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) {
634 cc_layer_->RequestCopyOfOutput(request.Pass()); 634 cc_layer_->RequestCopyOfOutput(request.Pass());
635 } 635 }
636 636
637 void Layer::PaintContents(SkCanvas* sk_canvas, 637 void Layer::PaintContents(SkCanvas* sk_canvas,
638 const gfx::Rect& clip, 638 const gfx::Rect& clip,
639 bool can_paint_lcd_text,
639 gfx::RectF* opaque, 640 gfx::RectF* opaque,
640 ContentLayerClient::GraphicsContextStatus gc_status) { 641 ContentLayerClient::GraphicsContextStatus gc_status) {
641 TRACE_EVENT0("ui", "Layer::PaintContents"); 642 TRACE_EVENT0("ui", "Layer::PaintContents");
642 scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling( 643 scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling(
643 sk_canvas, device_scale_factor_)); 644 sk_canvas, device_scale_factor_));
644 if (delegate_) 645 if (delegate_)
645 delegate_->OnPaintLayer(canvas.get()); 646 delegate_->OnPaintLayer(canvas.get());
646 } 647 }
647 648
649 bool Layer::PaintsLCDText() const {
650 return false;
651 }
652
648 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } 653 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; }
649 654
650 bool Layer::PrepareTextureMailbox( 655 bool Layer::PrepareTextureMailbox(
651 cc::TextureMailbox* mailbox, 656 cc::TextureMailbox* mailbox,
652 scoped_ptr<cc::SingleReleaseCallback>* release_callback, 657 scoped_ptr<cc::SingleReleaseCallback>* release_callback,
653 bool use_shared_memory) { 658 bool use_shared_memory) {
654 if (!mailbox_release_callback_) 659 if (!mailbox_release_callback_)
655 return false; 660 return false;
656 *mailbox = mailbox_; 661 *mailbox = mailbox_;
657 *release_callback = mailbox_release_callback_.Pass(); 662 *release_callback = mailbox_release_callback_.Pass();
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 delegated_renderer_layer_->SetDisplaySize(frame_size_in_dip_); 929 delegated_renderer_layer_->SetDisplaySize(frame_size_in_dip_);
925 } 930 }
926 cc_layer_->SetBounds(size); 931 cc_layer_->SetBounds(size);
927 } 932 }
928 933
929 void Layer::RecomputePosition() { 934 void Layer::RecomputePosition() {
930 cc_layer_->SetPosition(gfx::PointF(bounds_.x(), bounds_.y())); 935 cc_layer_->SetPosition(gfx::PointF(bounds_.x(), bounds_.y()));
931 } 936 }
932 937
933 } // namespace ui 938 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698