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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 2862923002: More cleanups on the CanvasRenderingContextHost front (Closed)
Patch Set: Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 void CanvasRenderingContext2D::ResourceContentChanged() { 579 void CanvasRenderingContext2D::ResourceContentChanged() {
580 ResourceElementChanged(); 580 ResourceElementChanged();
581 } 581 }
582 582
583 void CanvasRenderingContext2D::ResourceElementChanged() { 583 void CanvasRenderingContext2D::ResourceElementChanged() {
584 ClearFilterReferences(); 584 ClearFilterReferences();
585 GetState().ClearResolvedFilter(); 585 GetState().ClearResolvedFilter();
586 } 586 }
587 587
588 bool CanvasRenderingContext2D::OriginClean() const { 588 bool CanvasRenderingContext2D::OriginClean() const {
589 return canvas()->OriginClean(); 589 return host()->OriginClean();
590 } 590 }
591 591
592 void CanvasRenderingContext2D::SetOriginTainted() { 592 void CanvasRenderingContext2D::SetOriginTainted() {
593 return canvas()->SetOriginTainted(); 593 return host()->SetOriginTainted();
594 } 594 }
595 595
596 int CanvasRenderingContext2D::Width() const { 596 int CanvasRenderingContext2D::Width() const {
597 return canvas()->width(); 597 return host()->Size().Width();
598 } 598 }
599 599
600 int CanvasRenderingContext2D::Height() const { 600 int CanvasRenderingContext2D::Height() const {
601 return canvas()->height(); 601 return host()->Size().Height();
602 } 602 }
603 603
604 bool CanvasRenderingContext2D::HasImageBuffer() const { 604 bool CanvasRenderingContext2D::HasImageBuffer() const {
605 return host()->GetImageBuffer(); 605 return host()->GetImageBuffer();
606 } 606 }
607 607
608 ImageBuffer* CanvasRenderingContext2D::GetImageBuffer() const { 608 ImageBuffer* CanvasRenderingContext2D::GetImageBuffer() const {
609 return const_cast<CanvasRenderingContextHost*>(host()) 609 return const_cast<CanvasRenderingContextHost*>(host())
610 ->GetOrCreateImageBuffer(); 610 ->GetOrCreateImageBuffer();
611 } 611 }
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 } 1192 }
1193 return true; 1193 return true;
1194 } 1194 }
1195 1195
1196 void CanvasRenderingContext2D::ResetUsageTracking() { 1196 void CanvasRenderingContext2D::ResetUsageTracking() {
1197 UsageCounters new_counters; 1197 UsageCounters new_counters;
1198 usage_counters_ = new_counters; 1198 usage_counters_ = new_counters;
1199 } 1199 }
1200 1200
1201 } // namespace blink 1201 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698