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

Side by Side Diff: ui/gl/gl_image_memory.h

Issue 1299713003: GLImage::OnMemoryDump Stubs + Some Impls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@images1.3
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GL_GL_IMAGE_MEMORY_H_ 5 #ifndef UI_GL_GL_IMAGE_MEMORY_H_
6 #define UI_GL_GL_IMAGE_MEMORY_H_ 6 #define UI_GL_GL_IMAGE_MEMORY_H_
7 7
8 #include "ui/gl/gl_image.h" 8 #include "ui/gl/gl_image.h"
9 9
10 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ 10 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void DidModifyTexImage() override {} 43 void DidModifyTexImage() override {}
44 bool ScheduleOverlayPlane(AcceleratedWidget widget, 44 bool ScheduleOverlayPlane(AcceleratedWidget widget,
45 int z_order, 45 int z_order,
46 OverlayTransform transform, 46 OverlayTransform transform,
47 const Rect& bounds_rect, 47 const Rect& bounds_rect,
48 const RectF& crop_rect) override; 48 const RectF& crop_rect) override;
49 49
50 protected: 50 protected:
51 ~GLImageMemory() override; 51 ~GLImageMemory() override;
52 52
53 BufferFormat format() const { return format_; }
ericrk 2015/08/18 07:39:53 Used by derived classes to calculate size.
54
53 private: 55 private:
54 void DoBindTexImage(unsigned target); 56 void DoBindTexImage(unsigned target);
55 57
56 const Size size_; 58 const Size size_;
57 const unsigned internalformat_; 59 const unsigned internalformat_;
58 const unsigned char* memory_; 60 const unsigned char* memory_;
59 BufferFormat format_; 61 BufferFormat format_;
60 bool in_use_; 62 bool in_use_;
61 unsigned target_; 63 unsigned target_;
62 bool need_do_bind_tex_image_; 64 bool need_do_bind_tex_image_;
63 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ 65 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \
64 defined(USE_OZONE) 66 defined(USE_OZONE)
65 unsigned egl_texture_id_; 67 unsigned egl_texture_id_;
66 EGLImageKHR egl_image_; 68 EGLImageKHR egl_image_;
67 #endif 69 #endif
68 70
69 DISALLOW_COPY_AND_ASSIGN(GLImageMemory); 71 DISALLOW_COPY_AND_ASSIGN(GLImageMemory);
70 }; 72 };
71 73
72 } // namespace gfx 74 } // namespace gfx
73 75
74 #endif // UI_GL_GL_IMAGE_MEMORY_H_ 76 #endif // UI_GL_GL_IMAGE_MEMORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698