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

Unified Diff: cc/caching_bitmap_content_layer_updater.cc

Issue 12471007: Part 8 of cc/ directory shuffles: resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/caching_bitmap_content_layer_updater.h ('k') | cc/cc.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/caching_bitmap_content_layer_updater.cc
diff --git a/cc/caching_bitmap_content_layer_updater.cc b/cc/caching_bitmap_content_layer_updater.cc
deleted file mode 100644
index 063ffc8cc5eca84575201f7a429884b49b81bd84..0000000000000000000000000000000000000000
--- a/cc/caching_bitmap_content_layer_updater.cc
+++ /dev/null
@@ -1,53 +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 "caching_bitmap_content_layer_updater.h"
-
-#include "base/logging.h"
-#include "cc/layer_painter.h"
-#include "skia/ext/platform_canvas.h"
-
-namespace cc {
-
-scoped_refptr<CachingBitmapContentLayerUpdater>
-CachingBitmapContentLayerUpdater::Create(scoped_ptr<LayerPainter> painter) {
- return make_scoped_refptr(
- new CachingBitmapContentLayerUpdater(painter.Pass()));
-}
-
-CachingBitmapContentLayerUpdater::CachingBitmapContentLayerUpdater(
- scoped_ptr<LayerPainter> painter)
- : BitmapContentLayerUpdater(painter.Pass()), 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,
- RenderingStats* stats) {
- BitmapContentLayerUpdater::PrepareToUpdate(content_rect,
- tile_size,
- contents_width_scale,
- contents_height_scale,
- resulting_opaque_rect,
- stats);
-
- const SkBitmap& new_bitmap = canvas_->getDevice()->accessBitmap(false);
- SkAutoLockPixels lock(new_bitmap);
- DCHECK(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
« no previous file with comments | « cc/caching_bitmap_content_layer_updater.h ('k') | cc/cc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698