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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 15688002: Part 1/3 (compositor) of adding with device scale factor to transport surfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Android build Created 7 years, 6 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
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 #include "content/browser/renderer_host/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 #include <map> 9 #include <map>
10 10
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 namespace { 43 namespace {
44 44
45 // Used for drawing directly to the screen. Bypasses resizing and swaps. 45 // Used for drawing directly to the screen. Bypasses resizing and swaps.
46 class DirectOutputSurface : public cc::OutputSurface { 46 class DirectOutputSurface : public cc::OutputSurface {
47 public: 47 public:
48 DirectOutputSurface(scoped_ptr<WebKit::WebGraphicsContext3D> context3d) 48 DirectOutputSurface(scoped_ptr<WebKit::WebGraphicsContext3D> context3d)
49 : cc::OutputSurface(context3d.Pass()) {} 49 : cc::OutputSurface(context3d.Pass()) {}
50 50
51 virtual void Reshape(gfx::Size size) OVERRIDE {} 51 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE {}
52 virtual void PostSubBuffer(gfx::Rect rect, const cc::LatencyInfo&) OVERRIDE {} 52 virtual void PostSubBuffer(gfx::Rect rect, const cc::LatencyInfo&) OVERRIDE {}
53 virtual void SwapBuffers(const cc::LatencyInfo&) OVERRIDE { 53 virtual void SwapBuffers(const cc::LatencyInfo&) OVERRIDE {
54 context3d()->shallowFlushCHROMIUM(); 54 context3d()->shallowFlushCHROMIUM();
55 } 55 }
56 }; 56 };
57 57
58 static bool g_initialized = false; 58 static bool g_initialized = false;
59 static webkit_glue::WebThreadImpl* g_impl_thread = NULL; 59 static webkit_glue::WebThreadImpl* g_impl_thread = NULL;
60 static bool g_use_direct_gl = false; 60 static bool g_use_direct_gl = false;
61 61
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 case ANDROID_BITMAP_FORMAT_RGBA_8888: 458 case ANDROID_BITMAP_FORMAT_RGBA_8888:
459 return GL_UNSIGNED_BYTE; 459 return GL_UNSIGNED_BYTE;
460 break; 460 break;
461 case ANDROID_BITMAP_FORMAT_RGB_565: 461 case ANDROID_BITMAP_FORMAT_RGB_565:
462 default: 462 default:
463 return GL_UNSIGNED_SHORT_5_6_5; 463 return GL_UNSIGNED_SHORT_5_6_5;
464 } 464 }
465 } 465 }
466 466
467 } // namespace content 467 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698