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

Side by Side Diff: cc/resource_provider.cc

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Found the windows failure, and fixed it. Thanks akalin@ Created 8 years, 1 month 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/layer_tree_host_impl_unittest.cc ('k') | cc/shader.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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/resource_provider.h" 7 #include "cc/resource_provider.h"
8 8
9 #include <limits.h> 9 #include <limits.h>
10 10
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 context3d->bindTexture(GL_TEXTURE_2D, resource->glId); 277 context3d->bindTexture(GL_TEXTURE_2D, resource->glId);
278 m_textureUploader->upload(image, 278 m_textureUploader->upload(image,
279 imageRect, 279 imageRect,
280 sourceRect, 280 sourceRect,
281 destOffset, 281 destOffset,
282 resource->format, 282 resource->format,
283 resource->size); 283 resource->size);
284 } 284 }
285 285
286 if (resource->pixels) { 286 if (resource->pixels) {
287 DCHECK(resource->format == GL_RGBA);
287 SkBitmap srcFull; 288 SkBitmap srcFull;
288 srcFull.setConfig(SkBitmap::kARGB_8888_Config, imageRect.width(), imageR ect.height()); 289 srcFull.setConfig(SkBitmap::kARGB_8888_Config, imageRect.width(), imageR ect.height());
289 srcFull.setPixels(const_cast<uint8_t*>(image)); 290 srcFull.setPixels(const_cast<uint8_t*>(image));
290 SkBitmap srcSubset; 291 SkBitmap srcSubset;
291 SkIRect skSourceRect = SkIRect::MakeXYWH(sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height()); 292 SkIRect skSourceRect = SkIRect::MakeXYWH(sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height());
292 skSourceRect.offset(-imageRect.x(), -imageRect.y()); 293 skSourceRect.offset(-imageRect.x(), -imageRect.y());
293 srcFull.extractSubset(&srcSubset, skSourceRect); 294 srcFull.extractSubset(&srcSubset, skSourceRect);
294 295
295 ScopedWriteLockSoftware lock(this, id); 296 ScopedWriteLockSoftware lock(this, id);
296 SkCanvas* dest = lock.skCanvas(); 297 SkCanvas* dest = lock.skCanvas();
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 g_debugZone = zone; 709 g_debugZone = zone;
709 } 710 }
710 711
711 void ResourceProvider::debugNotifyLeaveZone() 712 void ResourceProvider::debugNotifyLeaveZone()
712 { 713 {
713 g_debugZone = 0; 714 g_debugZone = 0;
714 } 715 }
715 716
716 717
717 } // namespace cc 718 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl_unittest.cc ('k') | cc/shader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698