| OLD | NEW |
| 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/bitmap_content_layer_updater.h" | 5 #include "cc/resources/bitmap_content_layer_updater.h" |
| 6 | 6 |
| 7 #include "cc/debug/devtools_instrumentation.h" | 7 #include "cc/debug/devtools_instrumentation.h" |
| 8 #include "cc/debug/rendering_stats_instrumentation.h" | 8 #include "cc/debug/rendering_stats_instrumentation.h" |
| 9 #include "cc/resources/layer_painter.h" | 9 #include "cc/resources/layer_painter.h" |
| 10 #include "cc/resources/prioritized_resource.h" | 10 #include "cc/resources/prioritized_resource.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 PaintContents(canvas_.get(), | 78 PaintContents(canvas_.get(), |
| 79 content_rect, | 79 content_rect, |
| 80 contents_width_scale, | 80 contents_width_scale, |
| 81 contents_height_scale, | 81 contents_height_scale, |
| 82 resulting_opaque_rect); | 82 resulting_opaque_rect); |
| 83 base::TimeDelta duration = | 83 base::TimeDelta duration = |
| 84 rendering_stats_instrumentation_->EndRecording(start_time); | 84 rendering_stats_instrumentation_->EndRecording(start_time); |
| 85 rendering_stats_instrumentation_->AddPaint( | 85 rendering_stats_instrumentation_->AddPaint( |
| 86 duration, | 86 duration, |
| 87 content_rect.width() * content_rect.height()); | 87 content_rect.width() * content_rect.height()); |
| 88 //*resulting_opaque_rect = content_rect; |
| 88 } | 89 } |
| 89 | 90 |
| 90 void BitmapContentLayerUpdater::UpdateTexture(ResourceUpdateQueue* queue, | 91 void BitmapContentLayerUpdater::UpdateTexture(ResourceUpdateQueue* queue, |
| 91 PrioritizedResource* texture, | 92 PrioritizedResource* texture, |
| 92 const gfx::Rect& source_rect, | 93 const gfx::Rect& source_rect, |
| 93 const gfx::Vector2d& dest_offset, | 94 const gfx::Vector2d& dest_offset, |
| 94 bool partial_update) { | 95 bool partial_update) { |
| 95 CHECK(canvas_); | 96 CHECK(canvas_); |
| 96 ResourceUpdate upload = ResourceUpdate::Create(texture, | 97 ResourceUpdate upload = ResourceUpdate::Create(texture, |
| 97 &bitmap_backing_, | 98 &bitmap_backing_, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 112 void BitmapContentLayerUpdater::SetOpaque(bool opaque) { | 113 void BitmapContentLayerUpdater::SetOpaque(bool opaque) { |
| 113 if (opaque != layer_is_opaque_) { | 114 if (opaque != layer_is_opaque_) { |
| 114 canvas_.clear(); | 115 canvas_.clear(); |
| 115 canvas_size_ = gfx::Size(); | 116 canvas_size_ = gfx::Size(); |
| 116 } | 117 } |
| 117 | 118 |
| 118 ContentLayerUpdater::SetOpaque(opaque); | 119 ContentLayerUpdater::SetOpaque(opaque); |
| 119 } | 120 } |
| 120 | 121 |
| 121 } // namespace cc | 122 } // namespace cc |
| OLD | NEW |