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

Side by Side Diff: cc/video_layer_impl.cc

Issue 11578019: Remove the pools from the ResourceProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-resolve against HEAD Created 8 years 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
« no previous file with comments | « cc/tiled_layer_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/video_layer_impl.h" 5 #include "cc/video_layer_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/io_surface_draw_quad.h" 8 #include "cc/io_surface_draw_quad.h"
9 #include "cc/layer_tree_impl.h" 9 #include "cc/layer_tree_impl.h"
10 #include "cc/math_util.h" 10 #include "cc/math_util.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 309 }
310 return dimensions; 310 return dimensions;
311 } 311 }
312 312
313 bool VideoLayerImpl::FramePlane::allocateData( 313 bool VideoLayerImpl::FramePlane::allocateData(
314 ResourceProvider* resourceProvider) 314 ResourceProvider* resourceProvider)
315 { 315 {
316 if (resourceId) 316 if (resourceId)
317 return true; 317 return true;
318 318
319 resourceId = resourceProvider->createResource(Renderer::ImplPool, size, form at, ResourceProvider::TextureUsageAny); 319 resourceId = resourceProvider->createResource(size, format, ResourceProvider ::TextureUsageAny);
320 return resourceId; 320 return resourceId;
321 } 321 }
322 322
323 void VideoLayerImpl::FramePlane::freeData(ResourceProvider* resourceProvider) 323 void VideoLayerImpl::FramePlane::freeData(ResourceProvider* resourceProvider)
324 { 324 {
325 if (!resourceId) 325 if (!resourceId)
326 return; 326 return;
327 327
328 resourceProvider->deleteResource(resourceId); 328 resourceProvider->deleteResource(resourceId);
329 resourceId = 0; 329 resourceId = 0;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 { 420 {
421 layerTreeImpl()->SetNeedsRedraw(); 421 layerTreeImpl()->SetNeedsRedraw();
422 } 422 }
423 423
424 const char* VideoLayerImpl::layerTypeAsString() const 424 const char* VideoLayerImpl::layerTypeAsString() const
425 { 425 {
426 return "VideoLayer"; 426 return "VideoLayer";
427 } 427 }
428 428
429 } // namespace cc 429 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiled_layer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698