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

Unified Diff: cc/resources/bitmap_skpicture_content_layer_updater.cc

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/resources/bitmap_skpicture_content_layer_updater.h ('k') | cc/resources/bitmap_tile_task_worker_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/bitmap_skpicture_content_layer_updater.cc
diff --git a/cc/resources/bitmap_skpicture_content_layer_updater.cc b/cc/resources/bitmap_skpicture_content_layer_updater.cc
deleted file mode 100644
index a78a9df4ded524e65914683303321814146f62a2..0000000000000000000000000000000000000000
--- a/cc/resources/bitmap_skpicture_content_layer_updater.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2011 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/bitmap_skpicture_content_layer_updater.h"
-
-#include "base/time/time.h"
-#include "cc/debug/rendering_stats_instrumentation.h"
-#include "cc/resources/layer_painter.h"
-#include "cc/resources/prioritized_resource.h"
-#include "cc/resources/resource_update_queue.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-
-namespace cc {
-
-BitmapSkPictureContentLayerUpdater::Resource::Resource(
- BitmapSkPictureContentLayerUpdater* updater,
- scoped_ptr<PrioritizedResource> texture)
- : ContentLayerUpdater::Resource(texture.Pass()), updater_(updater) {}
-
-void BitmapSkPictureContentLayerUpdater::Resource::Update(
- ResourceUpdateQueue* queue,
- const gfx::Rect& source_rect,
- const gfx::Vector2d& dest_offset,
- bool partial_update) {
- SkAlphaType at =
- updater_->layer_is_opaque() ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
- bitmap_.allocPixels(SkImageInfo::Make(
- source_rect.width(), source_rect.height(), kN32_SkColorType, at));
- SkCanvas canvas(bitmap_);
- updater_->PaintContentsRect(&canvas, source_rect);
-
- ResourceUpdate upload = ResourceUpdate::Create(
- texture(), &bitmap_, source_rect, source_rect, dest_offset);
- if (partial_update)
- queue->AppendPartialUpload(upload);
- else
- queue->AppendFullUpload(upload);
-}
-
-scoped_refptr<BitmapSkPictureContentLayerUpdater>
-BitmapSkPictureContentLayerUpdater::Create(
- scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation,
- int layer_id) {
- return make_scoped_refptr(
- new BitmapSkPictureContentLayerUpdater(painter.Pass(),
- stats_instrumentation,
- layer_id));
-}
-
-BitmapSkPictureContentLayerUpdater::BitmapSkPictureContentLayerUpdater(
- scoped_ptr<LayerPainter> painter,
- RenderingStatsInstrumentation* stats_instrumentation,
- int layer_id)
- : SkPictureContentLayerUpdater(painter.Pass(), layer_id) {
-}
-
-BitmapSkPictureContentLayerUpdater::~BitmapSkPictureContentLayerUpdater() {}
-
-scoped_ptr<LayerUpdater::Resource>
-BitmapSkPictureContentLayerUpdater::CreateResource(
- PrioritizedResourceManager* manager) {
- return make_scoped_ptr(
- new Resource(this, PrioritizedResource::Create(manager)));
-}
-
-void BitmapSkPictureContentLayerUpdater::PaintContentsRect(
- SkCanvas* canvas,
- const gfx::Rect& source_rect) {
- if (!canvas)
- return;
- // Translate the origin of content_rect to that of source_rect.
- canvas->translate(paint_rect().x() - source_rect.x(),
- paint_rect().y() - source_rect.y());
- DrawPicture(canvas);
-}
-
-} // namespace cc
« no previous file with comments | « cc/resources/bitmap_skpicture_content_layer_updater.h ('k') | cc/resources/bitmap_tile_task_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698