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

Side by Side Diff: cc/CCPrioritizedTexture.cpp

Issue 11074009: cc: Remove LayerTextureUpdater::Texture::updateRect() callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "CCPrioritizedTexture.h" 7 #include "CCPrioritizedTexture.h"
8 8
9 #include "CCPrioritizedTextureManager.h" 9 #include "CCPrioritizedTextureManager.h"
10 #include "CCPriorityCalculator.h" 10 #include "CCPriorityCalculator.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 const uint8_t* image, const IntRect& imageRect , 92 const uint8_t* image, const IntRect& imageRect ,
93 const IntRect& sourceRect, const IntSize& dest Offset) 93 const IntRect& sourceRect, const IntSize& dest Offset)
94 { 94 {
95 ASSERT(m_isAbovePriorityCutoff); 95 ASSERT(m_isAbovePriorityCutoff);
96 if (m_isAbovePriorityCutoff) 96 if (m_isAbovePriorityCutoff)
97 acquireBackingTexture(resourceProvider); 97 acquireBackingTexture(resourceProvider);
98 ASSERT(m_backing); 98 ASSERT(m_backing);
99 resourceProvider->upload(resourceId(), image, imageRect, sourceRect, destOff set); 99 resourceProvider->upload(resourceId(), image, imageRect, sourceRect, destOff set);
100 } 100 }
101 101
102 void CCPrioritizedTexture::acceleratedUpdate(
103 CCResourceProvider* resourceProvider,
104 SkPicture* picture, const IntRect& pictureRect,
105 const IntRect& sourceRect, const IntSize& destOffset)
106 {
107 ASSERT(m_isAbovePriorityCutoff);
108 if (m_isAbovePriorityCutoff)
109 acquireBackingTexture(resourceProvider);
110 ASSERT(m_backing);
111 resourceProvider->acceleratedUpdate(
112 resourceId(), picture, pictureRect, sourceRect, destOffset);
113 }
114
102 void CCPrioritizedTexture::link(Backing* backing) 115 void CCPrioritizedTexture::link(Backing* backing)
103 { 116 {
104 ASSERT(backing); 117 ASSERT(backing);
105 ASSERT(!backing->m_owner); 118 ASSERT(!backing->m_owner);
106 ASSERT(!m_backing); 119 ASSERT(!m_backing);
107 120
108 m_backing = backing; 121 m_backing = backing;
109 m_backing->m_owner = this; 122 m_backing->m_owner = this;
110 } 123 }
111 124
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 m_priorityAtLastPriorityUpdate = m_owner->requestPriority(); 184 m_priorityAtLastPriorityUpdate = m_owner->requestPriority();
172 m_wasAbovePriorityCutoffAtLastPriorityUpdate = m_owner->isAbovePriorityC utoff(); 185 m_wasAbovePriorityCutoffAtLastPriorityUpdate = m_owner->isAbovePriorityC utoff();
173 } else { 186 } else {
174 m_ownerExistedAtLastPriorityUpdate = false; 187 m_ownerExistedAtLastPriorityUpdate = false;
175 m_priorityAtLastPriorityUpdate = CCPriorityCalculator::lowestPriority(); 188 m_priorityAtLastPriorityUpdate = CCPriorityCalculator::lowestPriority();
176 m_wasAbovePriorityCutoffAtLastPriorityUpdate = false; 189 m_wasAbovePriorityCutoffAtLastPriorityUpdate = false;
177 } 190 }
178 } 191 }
179 192
180 } // namespace cc 193 } // namespace cc
OLDNEW
« no previous file with comments | « cc/CCPrioritizedTexture.h ('k') | cc/CCResourceProvider.h » ('j') | cc/CCResourceProvider.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698