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

Unified Diff: chrome/browser/android/compositor/layer/crushed_sprite_layer.h

Issue 2798123002: Remove crushed sprite resource and layer (Closed)
Patch Set: Rebase and fix my nits Created 3 years, 8 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
Index: chrome/browser/android/compositor/layer/crushed_sprite_layer.h
diff --git a/chrome/browser/android/compositor/layer/crushed_sprite_layer.h b/chrome/browser/android/compositor/layer/crushed_sprite_layer.h
deleted file mode 100644
index 0b425f10dce710a49221ec841a3ab37afd21abdc..0000000000000000000000000000000000000000
--- a/chrome/browser/android/compositor/layer/crushed_sprite_layer.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2015 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 CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CRUSHED_SPRITE_LAYER_H_
-#define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CRUSHED_SPRITE_LAYER_H_
-
-#include "base/macros.h"
-#include "chrome/browser/android/compositor/layer/layer.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/skia/include/core/SkRefCnt.h"
-
-class SkCanvas;
-
-namespace cc {
-class UIResourceLayer;
-}
-
-namespace ui {
-class CrushedSpriteResource;
-class ResourceManager;
-}
-
-namespace android {
-
-// A layer which manages drawing frames from a CrushedSpriteResource into an
-// SkCanvas backed by an SkBitmap. The final SkBitmap is passed to a
-// UIResourceLayer for display.
-class CrushedSpriteLayer : public Layer {
- public:
- static scoped_refptr<CrushedSpriteLayer> Create();
-
- // Loads the resource, calculates the sprite frame to display based on
- // |completion_percentage|, draws the rectangles for the frame on top
- // of the previous frame and sends to layer_ for display.
- void DrawSpriteFrame(ui::ResourceManager* resource_manager,
- int bitmap_res_id,
- int metadata_res_id,
- float completion_percentage);
-
- // Layer overrides.
- scoped_refptr<cc::Layer> layer() override;
-
- protected:
- CrushedSpriteLayer();
- ~CrushedSpriteLayer() override;
-
- private:
- // Draws the rectangles for |frame| to |canvas|.
- void DrawRectanglesForFrame(ui::CrushedSpriteResource* resource,
- int frame,
- SkCanvas* canvas);
-
- scoped_refptr<cc::UIResourceLayer> layer_;
- int frame_count_;
- int previous_frame_;
- SkBitmap previous_frame_bitmap_;
-
- DISALLOW_COPY_AND_ASSIGN(CrushedSpriteLayer);
-};
-
-} // namespace android
-
-#endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CRUSHED_SPRITE_LAYER_H_

Powered by Google App Engine
This is Rietveld 408576698