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

Unified Diff: ui/android/resources/ui_resource_android.cc

Issue 1371523003: Android: Don't destroy LayerTreeHost when Surface goes away (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « ui/android/resources/ui_resource_android.h ('k') | ui/android/resources/ui_resource_client_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/resources/ui_resource_android.cc
diff --git a/ui/android/resources/ui_resource_android.cc b/ui/android/resources/ui_resource_android.cc
deleted file mode 100644
index bc85bb88666a50033e24bc5d439c364d9ce7d5ab..0000000000000000000000000000000000000000
--- a/ui/android/resources/ui_resource_android.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2014 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 "ui/android/resources/ui_resource_android.h"
-
-#include "base/logging.h"
-#include "ui/android/resources/ui_resource_provider.h"
-
-namespace ui {
-
-scoped_ptr<UIResourceAndroid> UIResourceAndroid::CreateFromJavaBitmap(
- ui::UIResourceProvider* provider,
- const gfx::JavaBitmap& java_bitmap) {
- SkBitmap skbitmap = gfx::CreateSkBitmapFromJavaBitmap(java_bitmap);
- skbitmap.setImmutable();
-
- return make_scoped_ptr(new UIResourceAndroid(provider, skbitmap));
-}
-
-UIResourceAndroid::~UIResourceAndroid() {
- if (id_ && provider_)
- provider_->DeleteUIResource(id_);
-}
-
-cc::UIResourceBitmap UIResourceAndroid::GetBitmap(cc::UIResourceId uid,
- bool resource_lost) {
- DCHECK(!bitmap_.empty());
- return cc::UIResourceBitmap(bitmap_);
-}
-
-cc::UIResourceId UIResourceAndroid::id() {
- if (id_)
- return id_;
- if (!provider_ || bitmap_.empty())
- return 0;
- id_ = provider_->CreateUIResource(this);
- return id_;
-}
-
-void UIResourceAndroid::UIResourceIsInvalid() {
- id_ = 0;
-}
-
-UIResourceAndroid::UIResourceAndroid(ui::UIResourceProvider* provider,
- const SkBitmap& skbitmap)
- : provider_(provider), bitmap_(skbitmap), id_(0) {
-}
-
-} // namespace ui
« no previous file with comments | « ui/android/resources/ui_resource_android.h ('k') | ui/android/resources/ui_resource_client_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698