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

Side by Side Diff: cc/resources/prioritized_resource.cc

Issue 1191173002: cc: Remove TextureUploader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/resources/prioritized_resource.h" 5 #include "cc/resources/prioritized_resource.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "cc/resources/platform_color.h" 9 #include "cc/resources/platform_color.h"
10 #include "cc/resources/prioritized_resource_manager.h" 10 #include "cc/resources/prioritized_resource_manager.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 void PrioritizedResource::SetPixels(ResourceProvider* resource_provider, 82 void PrioritizedResource::SetPixels(ResourceProvider* resource_provider,
83 const uint8_t* image, 83 const uint8_t* image,
84 const gfx::Rect& image_rect, 84 const gfx::Rect& image_rect,
85 const gfx::Rect& source_rect, 85 const gfx::Rect& source_rect,
86 const gfx::Vector2d& dest_offset) { 86 const gfx::Vector2d& dest_offset) {
87 DCHECK(is_above_priority_cutoff_); 87 DCHECK(is_above_priority_cutoff_);
88 if (is_above_priority_cutoff_) 88 if (is_above_priority_cutoff_)
89 AcquireBackingTexture(resource_provider); 89 AcquireBackingTexture(resource_provider);
90 DCHECK(backing_); 90 DCHECK(backing_);
91 resource_provider->SetPixels(
vmpstr 2015/06/19 18:33:46 This doesn't need CopyToResource?
danakj 2015/06/19 18:34:40 Dead code, didn't bother. Unittests pass.
92 resource_id(), image, image_rect, source_rect, dest_offset);
93 91
94 // The component order may be bgra if we uploaded bgra pixels to rgba 92 // The component order may be bgra if we uploaded bgra pixels to rgba
95 // texture. Mark contents as swizzled if image component order is 93 // texture. Mark contents as swizzled if image component order is
96 // different than texture format. 94 // different than texture format.
97 contents_swizzled_ = !PlatformColor::SameComponentOrder(format_); 95 contents_swizzled_ = !PlatformColor::SameComponentOrder(format_);
98 } 96 }
99 97
100 void PrioritizedResource::Link(Backing* backing) { 98 void PrioritizedResource::Link(Backing* backing) {
101 DCHECK(backing); 99 DCHECK(backing);
102 DCHECK(!backing->owner_); 100 DCHECK(!backing->owner_);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 manager_->ReturnBackingTexture(this); 196 manager_->ReturnBackingTexture(this);
199 } 197 }
200 198
201 const Proxy* PrioritizedResource::Backing::proxy() const { 199 const Proxy* PrioritizedResource::Backing::proxy() const {
202 if (!owner_ || !owner_->resource_manager()) 200 if (!owner_ || !owner_->resource_manager())
203 return NULL; 201 return NULL;
204 return owner_->resource_manager()->ProxyForDebug(); 202 return owner_->resource_manager()->ProxyForDebug();
205 } 203 }
206 204
207 } // namespace cc 205 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698