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

Side by Side Diff: gpu/command_buffer/service/texture_definition.cc

Issue 1299713003: GLImage::OnMemoryDump Stubs + Some Impls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@images1.3
Patch Set: Fix android build. 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 #include "gpu/command_buffer/service/texture_definition.h" 5 #include "gpu/command_buffer/service/texture_definition.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 30 matching lines...) Expand all
41 const gfx::Rect& rect) override; 41 const gfx::Rect& rect) override;
42 void WillUseTexImage() override; 42 void WillUseTexImage() override;
43 void WillModifyTexImage() override; 43 void WillModifyTexImage() override;
44 void DidModifyTexImage() override; 44 void DidModifyTexImage() override;
45 void DidUseTexImage() override; 45 void DidUseTexImage() override;
46 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 46 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
47 int z_order, 47 int z_order,
48 gfx::OverlayTransform transform, 48 gfx::OverlayTransform transform,
49 const gfx::Rect& bounds_rect, 49 const gfx::Rect& bounds_rect,
50 const gfx::RectF& crop_rect) override; 50 const gfx::RectF& crop_rect) override;
51 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
52 uint64_t process_tracing_id,
53 const std::string& dump_name) override;
51 54
52 protected: 55 protected:
53 ~GLImageSync() override; 56 ~GLImageSync() override;
54 57
55 private: 58 private:
56 scoped_refptr<NativeImageBuffer> buffer_; 59 scoped_refptr<NativeImageBuffer> buffer_;
57 gfx::Size size_; 60 gfx::Size size_;
58 61
59 DISALLOW_COPY_AND_ASSIGN(GLImageSync); 62 DISALLOW_COPY_AND_ASSIGN(GLImageSync);
60 }; 63 };
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 114
112 bool GLImageSync::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 115 bool GLImageSync::ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
113 int z_order, 116 int z_order,
114 gfx::OverlayTransform transform, 117 gfx::OverlayTransform transform,
115 const gfx::Rect& bounds_rect, 118 const gfx::Rect& bounds_rect,
116 const gfx::RectF& crop_rect) { 119 const gfx::RectF& crop_rect) {
117 NOTREACHED(); 120 NOTREACHED();
118 return false; 121 return false;
119 } 122 }
120 123
124 void GLImageSync::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
125 uint64_t process_tracing_id,
126 const std::string& dump_name) {
127 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914
128 }
129
121 #if !defined(OS_MACOSX) 130 #if !defined(OS_MACOSX)
122 class NativeImageBufferEGL : public NativeImageBuffer { 131 class NativeImageBufferEGL : public NativeImageBuffer {
123 public: 132 public:
124 static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id); 133 static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id);
125 134
126 private: 135 private:
127 NativeImageBufferEGL(EGLDisplay display, EGLImageKHR image); 136 NativeImageBufferEGL(EGLDisplay display, EGLImageKHR image);
128 ~NativeImageBufferEGL() override; 137 ~NativeImageBufferEGL() override;
129 void AddClient(gfx::GLImage* client) override; 138 void AddClient(gfx::GLImage* client) override;
130 void RemoveClient(gfx::GLImage* client) override; 139 void RemoveClient(gfx::GLImage* client) override;
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 return true; 497 return true;
489 } 498 }
490 499
491 bool TextureDefinition::SafeToRenderFrom() const { 500 bool TextureDefinition::SafeToRenderFrom() const {
492 return level_info_.cleared_rect.Contains( 501 return level_info_.cleared_rect.Contains(
493 gfx::Rect(level_info_.width, level_info_.height)); 502 gfx::Rect(level_info_.width, level_info_.height));
494 } 503 }
495 504
496 } // namespace gles2 505 } // namespace gles2
497 } // namespace gpu 506 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/stream_texture_manager_in_process_android.cc ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698