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

Unified Diff: runtime/embedders/openglui/common/image_cache.h

Issue 25081002: Remove openglui embedder code (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: runtime/embedders/openglui/common/image_cache.h
diff --git a/runtime/embedders/openglui/common/image_cache.h b/runtime/embedders/openglui/common/image_cache.h
deleted file mode 100644
index 4aa22f878698c2743b348ec74d7f011e96f91c3d..0000000000000000000000000000000000000000
--- a/runtime/embedders/openglui/common/image_cache.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#ifndef EMBEDDERS_OPENGLUI_COMMON_IMAGE_CACHE_H_
-#define EMBEDDERS_OPENGLUI_COMMON_IMAGE_CACHE_H_
-
-#include <map>
-#include <string>
-#include "embedders/openglui/common/log.h"
-#include "embedders/openglui/common/opengl.h"
-#include "embedders/openglui/common/support.h"
-
-class ImageCache {
- public:
- static void Init(const char *resource_path) {
- if (instance_ == NULL) {
- instance_ = new ImageCache(resource_path);
- }
- }
-
- inline static const SkBitmap* GetImage(const char* src_url) {
- if (instance_ == NULL) {
- fprintf(stderr, "GetImage called with no instance_\n");
- return NULL;
- }
- return instance_->GetImage_(src_url);
- }
-
- inline static int GetWidth(const char* src_url) {
- if (instance_ == NULL) {
- fprintf(stderr, "GetWidth called with no instance_\n");
- return NULL;
- }
- return instance_->GetWidth_(src_url);
- }
-
- inline static int GetHeight(const char* src_url) {
- if (instance_ == NULL) {
- fprintf(stderr, "GetHeight called with no instance_\n");
- return NULL;
- }
- return instance_->GetHeight_(src_url);
- }
-
- private:
- explicit ImageCache(const char* resource_path);
- SkBitmap* Load(const char* src_url);
- const SkBitmap* GetImage_(const char* src_url);
- int GetWidth_(const char* src_url);
- int GetHeight_(const char* src_url);
-
- std::map<std::string, SkBitmap*> images;
- const char* resource_path_;
- static ImageCache* instance_;
-};
-
-#endif // EMBEDDERS_OPENGLUI_COMMON_IMAGE_CACHE_H_
« no previous file with comments | « runtime/embedders/openglui/common/graphics_handler.cc ('k') | runtime/embedders/openglui/common/image_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698