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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2724543002: Renamed deviceScaleFactor() to deviceScaleFactorDeprecated() in Page (Closed)
Patch Set: Rebase Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 } 308 }
309 309
310 void HTMLCanvasElement::didDraw(const FloatRect& rect) { 310 void HTMLCanvasElement::didDraw(const FloatRect& rect) {
311 if (rect.isEmpty()) 311 if (rect.isEmpty())
312 return; 312 return;
313 m_imageBufferIsClear = false; 313 m_imageBufferIsClear = false;
314 clearCopiedImage(); 314 clearCopiedImage();
315 if (layoutObject()) 315 if (layoutObject())
316 layoutObject()->setMayNeedPaintInvalidation(); 316 layoutObject()->setMayNeedPaintInvalidation();
317 if (m_context && m_context->is2d() && m_context->shouldAntialias() && 317 if (m_context && m_context->is2d() && m_context->shouldAntialias() &&
318 page() && page()->deviceScaleFactor() > 1.0f) { 318 page() && page()->deviceScaleFactorDeprecated() > 1.0f) {
319 FloatRect inflatedRect = rect; 319 FloatRect inflatedRect = rect;
320 inflatedRect.inflate(1); 320 inflatedRect.inflate(1);
321 m_dirtyRect.unite(inflatedRect); 321 m_dirtyRect.unite(inflatedRect);
322 } else { 322 } else {
323 m_dirtyRect.unite(rect); 323 m_dirtyRect.unite(rect);
324 } 324 }
325 if (m_context && m_context->is2d() && hasImageBuffer()) 325 if (m_context && m_context->is2d() && hasImageBuffer())
326 buffer()->didDraw(rect); 326 buffer()->didDraw(rect);
327 } 327 }
328 328
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 // Creates a placeholder layer first before Surface is created. 1456 // Creates a placeholder layer first before Surface is created.
1457 m_surfaceLayerBridge->createSolidColorLayer(); 1457 m_surfaceLayerBridge->createSolidColorLayer();
1458 } 1458 }
1459 } 1459 }
1460 1460
1461 void HTMLCanvasElement::OnWebLayerReplaced() { 1461 void HTMLCanvasElement::OnWebLayerReplaced() {
1462 setNeedsCompositingUpdate(); 1462 setNeedsCompositingUpdate();
1463 } 1463 }
1464 1464
1465 } // namespace blink 1465 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameHost.cpp ('k') | third_party/WebKit/Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698