diff options
author | simonhong@chromium.org <simonhong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-08 07:12:32 +0000 |
---|---|---|
committer | simonhong@chromium.org <simonhong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-08 07:12:32 +0000 |
commit | 28ddb500439ab2ed0e6f5fd616396b10ffe3a72c (patch) | |
tree | 7a65ea7031a3c519f52ad8f18a73da0413494dc9 | |
parent | 8e24fdf5c6b3440cd5a3f3c1ea1a824459b687fb (diff) | |
download | chromium_src-28ddb500439ab2ed0e6f5fd616396b10ffe3a72c.zip chromium_src-28ddb500439ab2ed0e6f5fd616396b10ffe3a72c.tar.gz chromium_src-28ddb500439ab2ed0e6f5fd616396b10ffe3a72c.tar.bz2 |
[cc] Cleanup: remove unused class - CachingBitmapContentLayerUpdater
No one uses this class.
R=enne@chromium.org
BUG=NONE
TEST=NONE(No functional change)
Review URL: https://codereview.chromium.org/127173002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243509 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/cc.gyp | 2 | ||||
-rw-r--r-- | cc/resources/caching_bitmap_content_layer_updater.cc | 61 | ||||
-rw-r--r-- | cc/resources/caching_bitmap_content_layer_updater.h | 46 |
3 files changed, 0 insertions, 109 deletions
@@ -302,8 +302,6 @@ 'resources/bitmap_content_layer_updater.h', 'resources/bitmap_skpicture_content_layer_updater.cc', 'resources/bitmap_skpicture_content_layer_updater.h', - 'resources/caching_bitmap_content_layer_updater.cc', - 'resources/caching_bitmap_content_layer_updater.h', 'resources/content_layer_updater.cc', 'resources/content_layer_updater.h', 'resources/etc1_pixel_ref.cc', diff --git a/cc/resources/caching_bitmap_content_layer_updater.cc b/cc/resources/caching_bitmap_content_layer_updater.cc deleted file mode 100644 index f6edb40..0000000 --- a/cc/resources/caching_bitmap_content_layer_updater.cc +++ /dev/null @@ -1,61 +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/resources/caching_bitmap_content_layer_updater.h" - -#include "base/logging.h" -#include "cc/resources/layer_painter.h" -#include "skia/ext/platform_canvas.h" - -namespace cc { - -scoped_refptr<CachingBitmapContentLayerUpdater> -CachingBitmapContentLayerUpdater::Create( - scoped_ptr<LayerPainter> painter, - RenderingStatsInstrumentation* stats_instrumentation, - int layer_id) { - return make_scoped_refptr( - new CachingBitmapContentLayerUpdater(painter.Pass(), - stats_instrumentation, - layer_id)); -} - -CachingBitmapContentLayerUpdater::CachingBitmapContentLayerUpdater( - scoped_ptr<LayerPainter> painter, - RenderingStatsInstrumentation* stats_instrumentation, - int layer_id) - : BitmapContentLayerUpdater(painter.Pass(), - stats_instrumentation, - layer_id), - pixels_did_change_(false) {} - -CachingBitmapContentLayerUpdater::~CachingBitmapContentLayerUpdater() {} - -void CachingBitmapContentLayerUpdater::PrepareToUpdate( - gfx::Rect content_rect, - gfx::Size tile_size, - float contents_width_scale, - float contents_height_scale, - gfx::Rect* resulting_opaque_rect) { - BitmapContentLayerUpdater::PrepareToUpdate(content_rect, - tile_size, - contents_width_scale, - contents_height_scale, - resulting_opaque_rect); - - const SkBitmap& new_bitmap = canvas_->getDevice()->accessBitmap(false); - SkAutoLockPixels lock(new_bitmap); - DCHECK_GT(new_bitmap.bytesPerPixel(), 0); - pixels_did_change_ = new_bitmap.config() != cached_bitmap_.config() || - new_bitmap.height() != cached_bitmap_.height() || - new_bitmap.width() != cached_bitmap_.width() || - memcmp(new_bitmap.getPixels(), - cached_bitmap_.getPixels(), - new_bitmap.getSafeSize()); - - if (pixels_did_change_) - new_bitmap.deepCopyTo(&cached_bitmap_, new_bitmap.config()); -} - -} // namespace cc diff --git a/cc/resources/caching_bitmap_content_layer_updater.h b/cc/resources/caching_bitmap_content_layer_updater.h deleted file mode 100644 index 8e98890..0000000 --- a/cc/resources/caching_bitmap_content_layer_updater.h +++ /dev/null @@ -1,46 +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. - -#ifndef CC_RESOURCES_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_ -#define CC_RESOURCES_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_ - -#include "base/compiler_specific.h" -#include "cc/resources/bitmap_content_layer_updater.h" -#include "third_party/skia/include/core/SkBitmap.h" - -namespace cc { - -class CachingBitmapContentLayerUpdater : public BitmapContentLayerUpdater { - public: - static scoped_refptr<CachingBitmapContentLayerUpdater> Create( - scoped_ptr<LayerPainter>, - RenderingStatsInstrumentation* stats_instrumentation, - int layer_id); - - virtual void PrepareToUpdate(gfx::Rect content_rect, - gfx::Size tile_size, - float contents_width_scale, - float contents_height_scale, - gfx::Rect* resulting_opaque_rect) OVERRIDE; - - bool pixels_did_change() const { - return pixels_did_change_; - } - - private: - CachingBitmapContentLayerUpdater( - scoped_ptr<LayerPainter> painter, - RenderingStatsInstrumentation* stats_instrumentation, - int layer_id); - virtual ~CachingBitmapContentLayerUpdater(); - - bool pixels_did_change_; - SkBitmap cached_bitmap_; - - DISALLOW_COPY_AND_ASSIGN(CachingBitmapContentLayerUpdater); -}; - -} // namespace cc - -#endif // CC_RESOURCES_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_ |