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

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

Issue 1461193003: Revert of [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make patch applicable Created 5 years 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
794 ImageBuffer* HTMLCanvasElement::buffer() const 789 ImageBuffer* HTMLCanvasElement::buffer() const
795 { 790 {
796 ASSERT(m_context); 791 ASSERT(m_context);
797 if (!hasImageBuffer() && !m_didFailToCreateImageBuffer) 792 if (!hasImageBuffer() && !m_didFailToCreateImageBuffer)
798 const_cast<HTMLCanvasElement*>(this)->createImageBuffer(); 793 const_cast<HTMLCanvasElement*>(this)->createImageBuffer();
799 return m_imageBuffer.get(); 794 return m_imageBuffer.get();
800 } 795 }
801 796
802 void HTMLCanvasElement::createImageBufferUsingSurfaceForTesting(PassOwnPtr<Image BufferSurface> surface) 797 void HTMLCanvasElement::createImageBufferUsingSurfaceForTesting(PassOwnPtr<Image BufferSurface> surface)
803 { 798 {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 { 920 {
926 return FloatSize(width(), height()); 921 return FloatSize(width(), height());
927 } 922 }
928 923
929 bool HTMLCanvasElement::isOpaque() const 924 bool HTMLCanvasElement::isOpaque() const
930 { 925 {
931 return m_context && !m_context->hasAlpha(); 926 return m_context && !m_context->hasAlpha();
932 } 927 }
933 928
934 } // blink 929 } // blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLCanvasElement.h ('k') | third_party/WebKit/Source/core/html/HTMLInputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698