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

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

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 190965 Created 7 years, 9 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/resources/image_layer_updater.h ('k') | cc/resources/layer_updater.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/image_layer_updater.h" 5 #include "cc/resources/image_layer_updater.h"
6 #include "cc/resources/prioritized_resource.h" 6 #include "cc/resources/prioritized_resource.h"
7 #include "cc/resources/resource_update_queue.h" 7 #include "cc/resources/resource_update_queue.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 ImageLayerUpdater::Resource::Resource(ImageLayerUpdater* updater, 11 ImageLayerUpdater::Resource::Resource(ImageLayerUpdater* updater,
12 scoped_ptr<PrioritizedResource> texture) 12 scoped_ptr<PrioritizedResource> texture)
13 : LayerUpdater::Resource(texture.Pass()), updater_(updater) {} 13 : LayerUpdater::Resource(texture.Pass()), updater_(updater) {}
14 14
15 ImageLayerUpdater::Resource::~Resource() {} 15 ImageLayerUpdater::Resource::~Resource() {}
16 16
17 void ImageLayerUpdater::Resource::Update(ResourceUpdateQueue* queue, 17 void ImageLayerUpdater::Resource::Update(ResourceUpdateQueue* queue,
18 gfx::Rect source_rect, 18 gfx::Rect source_rect,
19 gfx::Vector2d dest_offset, 19 gfx::Vector2d dest_offset,
20 bool partial_update, 20 bool partial_update) {
21 RenderingStats*) {
22 updater_->UpdateTexture( 21 updater_->UpdateTexture(
23 queue, texture(), source_rect, dest_offset, partial_update); 22 queue, texture(), source_rect, dest_offset, partial_update);
24 } 23 }
25 24
26 // static 25 // static
27 scoped_refptr<ImageLayerUpdater> ImageLayerUpdater::Create() { 26 scoped_refptr<ImageLayerUpdater> ImageLayerUpdater::Create() {
28 return make_scoped_refptr(new ImageLayerUpdater()); 27 return make_scoped_refptr(new ImageLayerUpdater());
29 } 28 }
30 29
31 scoped_ptr<LayerUpdater::Resource> ImageLayerUpdater::CreateResource( 30 scoped_ptr<LayerUpdater::Resource> ImageLayerUpdater::CreateResource(
(...skipping 19 matching lines...) Expand all
51 50
52 ResourceUpdate upload = ResourceUpdate::Create( 51 ResourceUpdate upload = ResourceUpdate::Create(
53 texture, &bitmap_, image_rect, clipped_source_rect, clipped_dest_offset); 52 texture, &bitmap_, image_rect, clipped_source_rect, clipped_dest_offset);
54 if (partial_update) 53 if (partial_update)
55 queue->AppendPartialUpload(upload); 54 queue->AppendPartialUpload(upload);
56 else 55 else
57 queue->AppendFullUpload(upload); 56 queue->AppendFullUpload(upload);
58 } 57 }
59 58
60 } // namespace cc 59 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/image_layer_updater.h ('k') | cc/resources/layer_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698