| OLD | NEW |
| 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/image_layer_updater.h" | 5 #include "cc/image_layer_updater.h" |
| 6 #include "cc/prioritized_resource.h" | 6 #include "cc/prioritized_resource.h" |
| 7 #include "cc/resource_update_queue.h" | 7 #include "cc/resource_update_queue.h" |
| 8 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| 11 ImageLayerUpdater::Resource::Resource(ImageLayerUpdater* updater, scoped_ptr<Pri
oritizedResource> texture) | 11 ImageLayerUpdater::Resource::Resource(ImageLayerUpdater* updater, scoped_ptr<Pri
oritizedResource> texture) |
| 12 : LayerUpdater::Resource(texture.Pass()) | 12 : LayerUpdater::Resource(texture.Pass()) |
| 13 , m_updater(updater) | 13 , m_updater(updater) |
| 14 { | 14 { |
| 15 } | 15 } |
| 16 | 16 |
| 17 ImageLayerUpdater::Resource::~Resource() | 17 ImageLayerUpdater::Resource::~Resource() |
| 18 { | 18 { |
| 19 } | 19 } |
| 20 | 20 |
| 21 void ImageLayerUpdater::Resource::update(ResourceUpdateQueue& queue, const gfx::
Rect& sourceRect, const gfx::Vector2d& destOffset, bool partialUpdate, Rendering
Stats&) | 21 void ImageLayerUpdater::Resource::update(ResourceUpdateQueue& queue, const gfx::
Rect& sourceRect, const gfx::Vector2d& destOffset, bool partialUpdate, Rendering
Stats*) |
| 22 { | 22 { |
| 23 m_updater->updateTexture(queue, texture(), sourceRect, destOffset, partialUp
date); | 23 m_updater->updateTexture(queue, texture(), sourceRect, destOffset, partialUp
date); |
| 24 } | 24 } |
| 25 | 25 |
| 26 // static | 26 // static |
| 27 scoped_refptr<ImageLayerUpdater> ImageLayerUpdater::create() | 27 scoped_refptr<ImageLayerUpdater> ImageLayerUpdater::create() |
| 28 { | 28 { |
| 29 return make_scoped_refptr(new ImageLayerUpdater()); | 29 return make_scoped_refptr(new ImageLayerUpdater()); |
| 30 } | 30 } |
| 31 | 31 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 55 else | 55 else |
| 56 queue.appendFullUpload(upload); | 56 queue.appendFullUpload(upload); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void ImageLayerUpdater::setBitmap(const SkBitmap& bitmap) | 59 void ImageLayerUpdater::setBitmap(const SkBitmap& bitmap) |
| 60 { | 60 { |
| 61 m_bitmap = bitmap; | 61 m_bitmap = bitmap; |
| 62 } | 62 } |
| 63 | 63 |
| 64 } | 64 } |
| OLD | NEW |