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

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

Issue 1455943002: [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 } 779 }
780 780
781 SkCanvas* HTMLCanvasElement::existingDrawingCanvas() const 781 SkCanvas* HTMLCanvasElement::existingDrawingCanvas() const
782 { 782 {
783 if (!hasImageBuffer()) 783 if (!hasImageBuffer())
784 return nullptr; 784 return nullptr;
785 785
786 return m_imageBuffer->canvas(); 786 return m_imageBuffer->canvas();
787 } 787 }
788 788
789 CanvasRenderingContext* HTMLCanvasElement::renderingContext() const
790 {
791 return m_context.get();
792 }
793
789 ImageBuffer* HTMLCanvasElement::buffer() const 794 ImageBuffer* HTMLCanvasElement::buffer() const
790 { 795 {
791 ASSERT(m_context); 796 ASSERT(m_context);
792 if (!hasImageBuffer() && !m_didFailToCreateImageBuffer) 797 if (!hasImageBuffer() && !m_didFailToCreateImageBuffer)
793 const_cast<HTMLCanvasElement*>(this)->createImageBuffer(); 798 const_cast<HTMLCanvasElement*>(this)->createImageBuffer();
794 return m_imageBuffer.get(); 799 return m_imageBuffer.get();
795 } 800 }
796 801
797 void HTMLCanvasElement::createImageBufferUsingSurfaceForTesting(PassOwnPtr<Image BufferSurface> surface) 802 void HTMLCanvasElement::createImageBufferUsingSurfaceForTesting(PassOwnPtr<Image BufferSurface> surface)
798 { 803 {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 { 925 {
921 return FloatSize(width(), height()); 926 return FloatSize(width(), height());
922 } 927 }
923 928
924 bool HTMLCanvasElement::isOpaque() const 929 bool HTMLCanvasElement::isOpaque() const
925 { 930 {
926 return m_context && !m_context->hasAlpha(); 931 return m_context && !m_context->hasAlpha();
927 } 932 }
928 933
929 } // blink 934 } // blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698