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

Side by Side Diff: cc/UnthrottledTextureUploader.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 "UnthrottledTextureUploader.h" 7 #include "UnthrottledTextureUploader.h"
8 8
9 #include "CCPrioritizedTexture.h"
10
9 namespace cc { 11 namespace cc {
10 12
11 size_t UnthrottledTextureUploader::numBlockingUploads() 13 size_t UnthrottledTextureUploader::numBlockingUploads()
12 { 14 {
13 return 0; 15 return 0;
14 } 16 }
15 17
16 void UnthrottledTextureUploader::markPendingUploadsAsNonBlocking() 18 void UnthrottledTextureUploader::markPendingUploadsAsNonBlocking()
17 { 19 {
18 } 20 }
19 21
20 double UnthrottledTextureUploader::estimatedTexturesPerSecond() 22 double UnthrottledTextureUploader::estimatedTexturesPerSecond()
21 { 23 {
22 return std::numeric_limits<double>::max(); 24 return std::numeric_limits<double>::max();
23 } 25 }
24 26
25 void UnthrottledTextureUploader::uploadTexture(CCResourceProvider* resourceProvi der, Parameters upload) 27 void UnthrottledTextureUploader::uploadTexture(CCResourceProvider* resourceProvi der, Parameters upload)
26 { 28 {
27 upload.texture->updateRect(resourceProvider, upload.sourceRect, upload.destO ffset); 29 if (upload.bitmap) {
30 upload.bitmap->lockPixels();
31 upload.texture->upload(
32 resourceProvider,
33 static_cast<const uint8_t*>(upload.bitmap->getPixels()),
34 upload.geometry.contentRect,
35 upload.geometry.sourceRect,
36 upload.geometry.destOffset);
37 upload.bitmap->unlockPixels();
38 }
39
40 // TODO(reveman): Move this logic to CCTextureUpdateController.
41 if (upload.picture) {
42 upload.texture->acceleratedUpdate(
43 resourceProvider,
44 upload.picture,
45 upload.geometry.contentRect,
46 upload.geometry.sourceRect,
47 upload.geometry.destOffset);
48 }
28 } 49 }
29 50
30 } 51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698