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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2625803002: Disable LCD text in drag images (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 RespectImageOrientationEnum imageOrientation = 141 RespectImageOrientationEnum imageOrientation =
142 DoNotRespectImageOrientation) { 142 DoNotRespectImageOrientation) {
143 context().getPaintController().endItem<EndTransformDisplayItem>( 143 context().getPaintController().endItem<EndTransformDisplayItem>(
144 *m_pictureBuilder); 144 *m_pictureBuilder);
145 // TODO(fmalita): endRecording() should return a non-const SKP. 145 // TODO(fmalita): endRecording() should return a non-const SKP.
146 sk_sp<SkPicture> recording( 146 sk_sp<SkPicture> recording(
147 const_cast<SkPicture*>(m_pictureBuilder->endRecording().release())); 147 const_cast<SkPicture*>(m_pictureBuilder->endRecording().release()));
148 148
149 // Rasterize upfront, since DragImage::create() is going to do it anyway 149 // Rasterize upfront, since DragImage::create() is going to do it anyway
150 // (SkImage::asLegacyBitmap). 150 // (SkImage::asLegacyBitmap).
151 sk_sp<SkSurface> surface = 151 SkSurfaceProps surfaceProps(0, kUnknown_SkPixelGeometry);
152 SkSurface::MakeRasterN32Premul(m_bounds.width(), m_bounds.height()); 152 sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(
153 m_bounds.width(), m_bounds.height(), &surfaceProps);
153 if (!surface) 154 if (!surface)
154 return nullptr; 155 return nullptr;
155 156
156 surface->getCanvas()->drawPicture(recording); 157 surface->getCanvas()->drawPicture(recording);
157 RefPtr<Image> image = 158 RefPtr<Image> image =
158 StaticBitmapImage::create(surface->makeImageSnapshot()); 159 StaticBitmapImage::create(surface->makeImageSnapshot());
159 160
160 float screenDeviceScaleFactor = 161 float screenDeviceScaleFactor =
161 m_localFrame->page()->chromeClient().screenInfo().deviceScaleFactor; 162 m_localFrame->page()->chromeClient().screenInfo().deviceScaleFactor;
162 163
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 943 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
943 m_frame->client()->frameBlameContext()->Enter(); 944 m_frame->client()->frameBlameContext()->Enter();
944 } 945 }
945 946
946 ScopedFrameBlamer::~ScopedFrameBlamer() { 947 ScopedFrameBlamer::~ScopedFrameBlamer() {
947 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 948 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
948 m_frame->client()->frameBlameContext()->Leave(); 949 m_frame->client()->frameBlameContext()->Leave();
949 } 950 }
950 951
951 } // namespace blink 952 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698