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

Side by Side Diff: Source/WebCore/page/Page.cpp

Issue 7671031: Merge 92520 - [chromium] Accelerated canvas breaks when moving canvases or resources between Pages (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserv ed.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "SharedBuffer.h" 68 #include "SharedBuffer.h"
69 #include "SpeechInput.h" 69 #include "SpeechInput.h"
70 #include "SpeechInputClient.h" 70 #include "SpeechInputClient.h"
71 #include "TextResourceDecoder.h" 71 #include "TextResourceDecoder.h"
72 #include "Widget.h" 72 #include "Widget.h"
73 #include <wtf/HashMap.h> 73 #include <wtf/HashMap.h>
74 #include <wtf/RefCountedLeakCounter.h> 74 #include <wtf/RefCountedLeakCounter.h>
75 #include <wtf/StdLibExtras.h> 75 #include <wtf/StdLibExtras.h>
76 #include <wtf/text/StringHash.h> 76 #include <wtf/text/StringHash.h>
77 77
78 #if ENABLE(ACCELERATED_2D_CANVAS)
79 #include "GraphicsContext3D.h"
80 #endif
81
82 #if ENABLE(DOM_STORAGE) 78 #if ENABLE(DOM_STORAGE)
83 #include "StorageArea.h" 79 #include "StorageArea.h"
84 #include "StorageNamespace.h" 80 #include "StorageNamespace.h"
85 #endif 81 #endif
86 82
87 #if ENABLE(CLIENT_BASED_GEOLOCATION) 83 #if ENABLE(CLIENT_BASED_GEOLOCATION)
88 #include "GeolocationController.h" 84 #include "GeolocationController.h"
89 #endif 85 #endif
90 86
91 namespace WebCore { 87 namespace WebCore {
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 { 741 {
746 if (m_debugger == debugger) 742 if (m_debugger == debugger)
747 return; 743 return;
748 744
749 m_debugger = debugger; 745 m_debugger = debugger;
750 746
751 for (Frame* frame = m_mainFrame.get(); frame; frame = frame->tree()->travers eNext()) 747 for (Frame* frame = m_mainFrame.get(); frame; frame = frame->tree()->travers eNext())
752 frame->script()->attachDebugger(m_debugger); 748 frame->script()->attachDebugger(m_debugger);
753 } 749 }
754 750
755 GraphicsContext3D* Page::sharedGraphicsContext3D()
756 {
757 #if ENABLE(ACCELERATED_2D_CANVAS)
758 if (!m_sharedGraphicsContext3D) {
759 GraphicsContext3D::Attributes attr;
760 attr.depth = false;
761 attr.stencil = true;
762 attr.antialias = false;
763 attr.canRecoverFromContextLoss = false; // Canvas contexts can not handl e lost contexts.
764 m_sharedGraphicsContext3D = GraphicsContext3D::create(attr, chrome());
765 }
766 return m_sharedGraphicsContext3D.get();
767 #else // !ENABLE(ACCELERATED_2D_CANVAS)
768 return 0;
769 #endif
770 }
771
772 #if ENABLE(DOM_STORAGE) 751 #if ENABLE(DOM_STORAGE)
773 StorageNamespace* Page::sessionStorage(bool optionalCreate) 752 StorageNamespace* Page::sessionStorage(bool optionalCreate)
774 { 753 {
775 if (!m_sessionStorage && optionalCreate) 754 if (!m_sessionStorage && optionalCreate)
776 m_sessionStorage = StorageNamespace::sessionStorageNamespace(this, m_set tings->sessionStorageQuota()); 755 m_sessionStorage = StorageNamespace::sessionStorageNamespace(this, m_set tings->sessionStorageQuota());
777 756
778 return m_sessionStorage.get(); 757 return m_sessionStorage.get();
779 } 758 }
780 759
781 void Page::setSessionStorage(PassRefPtr<StorageNamespace> newStorage) 760 void Page::setSessionStorage(PassRefPtr<StorageNamespace> newStorage)
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 , speechInputClient(0) 946 , speechInputClient(0)
968 , mediaStreamClient(0) 947 , mediaStreamClient(0)
969 { 948 {
970 } 949 }
971 950
972 Page::PageClients::~PageClients() 951 Page::PageClients::~PageClients()
973 { 952 {
974 } 953 }
975 954
976 } // namespace WebCore 955 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/page/Page.h ('k') | Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698