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

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 463543002: Oilpan: Ensure that classes with virtual trace methods always have vtables for their left-most base… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 public: 495 public:
496 static PassOwnPtrWillBeRawPtr<WebGLRenderingContextLostCallback> create(WebG LRenderingContextBase* context) 496 static PassOwnPtrWillBeRawPtr<WebGLRenderingContextLostCallback> create(WebG LRenderingContextBase* context)
497 { 497 {
498 return adoptPtrWillBeNoop(new WebGLRenderingContextLostCallback(context) ); 498 return adoptPtrWillBeNoop(new WebGLRenderingContextLostCallback(context) );
499 } 499 }
500 500
501 virtual ~WebGLRenderingContextLostCallback() { } 501 virtual ~WebGLRenderingContextLostCallback() { }
502 502
503 virtual void onContextLost() { m_context->forceLostContext(WebGLRenderingCon textBase::RealLostContext); } 503 virtual void onContextLost() { m_context->forceLostContext(WebGLRenderingCon textBase::RealLostContext); }
504 504
505 void trace(Visitor* visitor) 505 virtual void trace(Visitor* visitor)
506 { 506 {
507 visitor->trace(m_context); 507 visitor->trace(m_context);
508 } 508 }
509 509
510 private: 510 private:
511 explicit WebGLRenderingContextLostCallback(WebGLRenderingContextBase* contex t) 511 explicit WebGLRenderingContextLostCallback(WebGLRenderingContextBase* contex t)
512 : m_context(context) { } 512 : m_context(context) { }
513 513
514 RawPtrWillBeMember<WebGLRenderingContextBase> m_context; 514 RawPtrWillBeMember<WebGLRenderingContextBase> m_context;
515 }; 515 };
516 516
517 class WebGLRenderingContextErrorMessageCallback FINAL : public NoBaseWillBeGarba geCollectedFinalized<WebGLRenderingContextErrorMessageCallback>, public blink::W ebGraphicsContext3D::WebGraphicsErrorMessageCallback { 517 class WebGLRenderingContextErrorMessageCallback FINAL : public NoBaseWillBeGarba geCollectedFinalized<WebGLRenderingContextErrorMessageCallback>, public blink::W ebGraphicsContext3D::WebGraphicsErrorMessageCallback {
518 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 518 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
519 public: 519 public:
520 static PassOwnPtrWillBeRawPtr<WebGLRenderingContextErrorMessageCallback> cre ate(WebGLRenderingContextBase* context) 520 static PassOwnPtrWillBeRawPtr<WebGLRenderingContextErrorMessageCallback> cre ate(WebGLRenderingContextBase* context)
521 { 521 {
522 return adoptPtrWillBeNoop(new WebGLRenderingContextErrorMessageCallback( context)); 522 return adoptPtrWillBeNoop(new WebGLRenderingContextErrorMessageCallback( context));
523 } 523 }
524 524
525 virtual ~WebGLRenderingContextErrorMessageCallback() { } 525 virtual ~WebGLRenderingContextErrorMessageCallback() { }
526 526
527 virtual void onErrorMessage(const blink::WebString& message, blink::WGC3Dint ) 527 virtual void onErrorMessage(const blink::WebString& message, blink::WGC3Dint )
528 { 528 {
529 if (m_context->m_synthesizedErrorsToConsole) 529 if (m_context->m_synthesizedErrorsToConsole)
530 m_context->printGLErrorToConsole(message); 530 m_context->printGLErrorToConsole(message);
531 InspectorInstrumentation::didFireWebGLErrorOrWarning(m_context->canvas() , message); 531 InspectorInstrumentation::didFireWebGLErrorOrWarning(m_context->canvas() , message);
532 } 532 }
533 533
534 void trace(Visitor* visitor) 534 virtual void trace(Visitor* visitor)
535 { 535 {
536 visitor->trace(m_context); 536 visitor->trace(m_context);
537 } 537 }
538 538
539 private: 539 private:
540 explicit WebGLRenderingContextErrorMessageCallback(WebGLRenderingContextBase * context) 540 explicit WebGLRenderingContextErrorMessageCallback(WebGLRenderingContextBase * context)
541 : m_context(context) { } 541 : m_context(context) { }
542 542
543 RawPtrWillBeMember<WebGLRenderingContextBase> m_context; 543 RawPtrWillBeMember<WebGLRenderingContextBase> m_context;
544 }; 544 };
(...skipping 5212 matching lines...) Expand 10 before | Expand all | Expand 10 after
5757 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0; 5757 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0;
5758 } 5758 }
5759 #else 5759 #else
5760 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const 5760 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const
5761 { 5761 {
5762 return m_drawingBuffer.get(); 5762 return m_drawingBuffer.get();
5763 } 5763 }
5764 #endif 5764 #endif
5765 5765
5766 } // namespace blink 5766 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698