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

Side by Side Diff: content/browser/renderer_host/image_transport_factory.h

Issue 10941017: Change the scale factor of texture_size from the layer's one to an estimation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/image_transport_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 virtual ui::ContextFactory* AsContextFactory() = 0; 62 virtual ui::ContextFactory* AsContextFactory() = 0;
63 63
64 // Creates a shared surface handle. 64 // Creates a shared surface handle.
65 // Note: the handle may get lost at any time, a state that an 65 // Note: the handle may get lost at any time, a state that an
66 // ImageTransportFactoryObserver gets notified of. 66 // ImageTransportFactoryObserver gets notified of.
67 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() = 0; 67 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() = 0;
68 68
69 // Destroys a shared surface handle. 69 // Destroys a shared surface handle.
70 virtual void DestroySharedSurfaceHandle(gfx::GLSurfaceHandle surface) = 0; 70 virtual void DestroySharedSurfaceHandle(gfx::GLSurfaceHandle surface) = 0;
71 71
72 // Creates a transport texture of a given size, and using the opaque handle 72 // Creates a transport texture of a given size and scale factor, and using the
73 // sent by the GPU process. 73 // opaque handle sent by the GPU process.
74 virtual scoped_refptr<ui::Texture> CreateTransportClient( 74 virtual scoped_refptr<ui::Texture> CreateTransportClient(
75 const gfx::Size& size, 75 const gfx::Size& size,
76 float device_scale_factor,
76 uint64 transport_handle) = 0; 77 uint64 transport_handle) = 0;
77 78
78 // Variant of CreateTransportClient() that deletes the texture on the GPU when 79 // Variant of CreateTransportClient() that deletes the texture on the GPU when
79 // the returned value is deleted. 80 // the returned value is deleted.
80 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( 81 virtual scoped_refptr<ui::Texture> CreateOwnedTexture(
81 const gfx::Size& size, 82 const gfx::Size& size,
83 float device_scale_factor,
82 unsigned int texture_id) = 0; 84 unsigned int texture_id) = 0;
83 85
84 // Gets a GLHelper instance, associated with the shared context. This 86 // Gets a GLHelper instance, associated with the shared context. This
85 // GLHelper will get destroyed whenever the shared context is lost 87 // GLHelper will get destroyed whenever the shared context is lost
86 // (ImageTransportFactoryObserver::OnLostResources is called). 88 // (ImageTransportFactoryObserver::OnLostResources is called).
87 virtual content::GLHelper* GetGLHelper() = 0; 89 virtual content::GLHelper* GetGLHelper() = 0;
88 90
89 // Inserts a SyncPoint into the shared context. 91 // Inserts a SyncPoint into the shared context.
90 virtual uint32 InsertSyncPoint() = 0; 92 virtual uint32 InsertSyncPoint() = 0;
91 93
92 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; 94 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0;
93 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; 95 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0;
94 }; 96 };
95 97
96 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ 98 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/image_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698