Index: cc/image_layer_updater.cc |
diff --git a/cc/image_layer_updater.cc b/cc/image_layer_updater.cc |
deleted file mode 100644 |
index 04db9aa956024c89361ff6388af57d68a10b9e8a..0000000000000000000000000000000000000000 |
--- a/cc/image_layer_updater.cc |
+++ /dev/null |
@@ -1,60 +0,0 @@ |
-// Copyright 2012 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "cc/image_layer_updater.h" |
-#include "cc/prioritized_resource.h" |
-#include "cc/resource_update_queue.h" |
- |
-namespace cc { |
- |
-ImageLayerUpdater::Resource::Resource(ImageLayerUpdater* updater, |
- scoped_ptr<PrioritizedResource> texture) |
- : LayerUpdater::Resource(texture.Pass()), updater_(updater) {} |
- |
-ImageLayerUpdater::Resource::~Resource() {} |
- |
-void ImageLayerUpdater::Resource::Update(ResourceUpdateQueue* queue, |
- gfx::Rect source_rect, |
- gfx::Vector2d dest_offset, |
- bool partial_update, |
- RenderingStats*) { |
- updater_->UpdateTexture( |
- queue, texture(), source_rect, dest_offset, partial_update); |
-} |
- |
-// static |
-scoped_refptr<ImageLayerUpdater> ImageLayerUpdater::Create() { |
- return make_scoped_refptr(new ImageLayerUpdater()); |
-} |
- |
-scoped_ptr<LayerUpdater::Resource> ImageLayerUpdater::CreateResource( |
- PrioritizedResourceManager* manager) { |
- return scoped_ptr<LayerUpdater::Resource>( |
- new Resource(this, PrioritizedResource::create(manager))); |
-} |
- |
-void ImageLayerUpdater::UpdateTexture(ResourceUpdateQueue* queue, |
- PrioritizedResource* texture, |
- gfx::Rect source_rect, |
- gfx::Vector2d dest_offset, |
- bool partial_update) { |
- // Source rect should never go outside the image pixels, even if this |
- // is requested because the texture extends outside the image. |
- gfx::Rect clipped_source_rect = source_rect; |
- gfx::Rect image_rect = gfx::Rect(0, 0, bitmap_.width(), bitmap_.height()); |
- clipped_source_rect.Intersect(image_rect); |
- |
- gfx::Vector2d clipped_dest_offset = |
- dest_offset + |
- gfx::Vector2d(clipped_source_rect.origin() - source_rect.origin()); |
- |
- ResourceUpdate upload = ResourceUpdate::Create( |
- texture, &bitmap_, image_rect, clipped_source_rect, clipped_dest_offset); |
- if (partial_update) |
- queue->appendPartialUpload(upload); |
- else |
- queue->appendFullUpload(upload); |
-} |
- |
-} |