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

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

Issue 13266002: cc: Pass RenderingStatsInstrumentation to ContentLayerUpdater (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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/skpicture_content_layer_updater.h ('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/resources/skpicture_content_layer_updater.h" 5 #include "cc/resources/skpicture_content_layer_updater.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/resources/layer_painter.h" 8 #include "cc/resources/layer_painter.h"
9 #include "cc/resources/prioritized_resource.h" 9 #include "cc/resources/prioritized_resource.h"
10 #include "cc/resources/resource_update_queue.h" 10 #include "cc/resources/resource_update_queue.h"
(...skipping 11 matching lines...) Expand all
22 void SkPictureContentLayerUpdater::Resource::Update(ResourceUpdateQueue* queue, 22 void SkPictureContentLayerUpdater::Resource::Update(ResourceUpdateQueue* queue,
23 gfx::Rect source_rect, 23 gfx::Rect source_rect,
24 gfx::Vector2d dest_offset, 24 gfx::Vector2d dest_offset,
25 bool partial_update, 25 bool partial_update,
26 RenderingStats*) { 26 RenderingStats*) {
27 updater_->UpdateTexture( 27 updater_->UpdateTexture(
28 queue, texture(), source_rect, dest_offset, partial_update); 28 queue, texture(), source_rect, dest_offset, partial_update);
29 } 29 }
30 30
31 SkPictureContentLayerUpdater::SkPictureContentLayerUpdater( 31 SkPictureContentLayerUpdater::SkPictureContentLayerUpdater(
32 scoped_ptr<LayerPainter> painter) 32 scoped_ptr<LayerPainter> painter,
33 : ContentLayerUpdater(painter.Pass()), layer_is_opaque_(false) {} 33 RenderingStatsInstrumentation* stats_instrumentation)
34 : ContentLayerUpdater(painter.Pass(), stats_instrumentation),
35 layer_is_opaque_(false) {}
34 36
35 SkPictureContentLayerUpdater::~SkPictureContentLayerUpdater() {} 37 SkPictureContentLayerUpdater::~SkPictureContentLayerUpdater() {}
36 38
37 scoped_refptr<SkPictureContentLayerUpdater> 39 scoped_refptr<SkPictureContentLayerUpdater>
38 SkPictureContentLayerUpdater::Create(scoped_ptr<LayerPainter> painter) { 40 SkPictureContentLayerUpdater::Create(
39 return make_scoped_refptr(new SkPictureContentLayerUpdater(painter.Pass())); 41 scoped_ptr<LayerPainter> painter,
42 RenderingStatsInstrumentation* stats_instrumentation) {
43 return make_scoped_refptr(
44 new SkPictureContentLayerUpdater(painter.Pass(), stats_instrumentation));
40 } 45 }
41 46
42 scoped_ptr<LayerUpdater::Resource> SkPictureContentLayerUpdater::CreateResource( 47 scoped_ptr<LayerUpdater::Resource> SkPictureContentLayerUpdater::CreateResource(
43 PrioritizedResourceManager* manager) { 48 PrioritizedResourceManager* manager) {
44 return scoped_ptr<LayerUpdater::Resource>( 49 return scoped_ptr<LayerUpdater::Resource>(
45 new Resource(this, PrioritizedResource::Create(manager))); 50 new Resource(this, PrioritizedResource::Create(manager)));
46 } 51 }
47 52
48 void SkPictureContentLayerUpdater::PrepareToUpdate( 53 void SkPictureContentLayerUpdater::PrepareToUpdate(
49 gfx::Rect content_rect, 54 gfx::Rect content_rect,
(...skipping 29 matching lines...) Expand all
79 queue->AppendPartialUpload(upload); 84 queue->AppendPartialUpload(upload);
80 else 85 else
81 queue->AppendFullUpload(upload); 86 queue->AppendFullUpload(upload);
82 } 87 }
83 88
84 void SkPictureContentLayerUpdater::SetOpaque(bool opaque) { 89 void SkPictureContentLayerUpdater::SetOpaque(bool opaque) {
85 layer_is_opaque_ = opaque; 90 layer_is_opaque_ = opaque;
86 } 91 }
87 92
88 } // namespace cc 93 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/skpicture_content_layer_updater.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698