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

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

Issue 2716203002: blink: Fix cc/paint skia type mismatches (Closed)
Patch Set: Fix canvas 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 m_imageBuffer->finalizeFrame(); 330 m_imageBuffer->finalizeFrame();
331 notifyListenersCanvasChanged(); 331 notifyListenersCanvasChanged();
332 } 332 }
333 333
334 void HTMLCanvasElement::didDisableAcceleration() { 334 void HTMLCanvasElement::didDisableAcceleration() {
335 // We must force a paint invalidation on the canvas even if it's 335 // We must force a paint invalidation on the canvas even if it's
336 // content did not change because it layer was destroyed. 336 // content did not change because it layer was destroyed.
337 didDraw(FloatRect(0, 0, size().width(), size().height())); 337 didDraw(FloatRect(0, 0, size().width(), size().height()));
338 } 338 }
339 339
340 void HTMLCanvasElement::restoreCanvasMatrixClipStack(SkCanvas* canvas) const { 340 void HTMLCanvasElement::restoreCanvasMatrixClipStack(
341 PaintCanvas* canvas) const {
341 if (m_context) 342 if (m_context)
342 m_context->restoreCanvasMatrixClipStack(canvas); 343 m_context->restoreCanvasMatrixClipStack(canvas);
343 } 344 }
344 345
345 void HTMLCanvasElement::doDeferredPaintInvalidation() { 346 void HTMLCanvasElement::doDeferredPaintInvalidation() {
346 DCHECK(!m_dirtyRect.isEmpty()); 347 DCHECK(!m_dirtyRect.isEmpty());
347 if (m_context->is2d()) { 348 if (m_context->is2d()) {
348 FloatRect srcRect(0, 0, size().width(), size().height()); 349 FloatRect srcRect(0, 0, size().width(), size().height());
349 m_dirtyRect.intersect(srcRect); 350 m_dirtyRect.intersect(srcRect);
350 LayoutBox* lb = layoutBox(); 351 LayoutBox* lb = layoutBox();
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 // Creates a placeholder layer first before Surface is created. 1455 // Creates a placeholder layer first before Surface is created.
1455 m_surfaceLayerBridge->createSolidColorLayer(); 1456 m_surfaceLayerBridge->createSolidColorLayer();
1456 } 1457 }
1457 } 1458 }
1458 1459
1459 void HTMLCanvasElement::OnWebLayerReplaced() { 1460 void HTMLCanvasElement::OnWebLayerReplaced() {
1460 setNeedsCompositingUpdate(); 1461 setNeedsCompositingUpdate();
1461 } 1462 }
1462 1463
1463 } // namespace blink 1464 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698