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

Unified Diff: android_webview/browser/parent_output_surface.cc

Issue 287993004: [Android WebView] Implement Ubercomp for Render Thread support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 6 years, 7 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: android_webview/browser/parent_output_surface.cc
diff --git a/android_webview/browser/parent_output_surface.cc b/android_webview/browser/parent_output_surface.cc
new file mode 100644
index 0000000000000000000000000000000000000000..12802eb09dd854f8b8697ca968039caa7b9f37b7
--- /dev/null
+++ b/android_webview/browser/parent_output_surface.cc
@@ -0,0 +1,36 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "android_webview/browser/parent_output_surface.h"
+
+#include "cc/output/output_surface_client.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
+
+namespace android_webview {
+
+ParentOutputSurface::ParentOutputSurface(
+ scoped_refptr<cc::ContextProvider> context_provider)
+ : cc::OutputSurface(context_provider) {
+ capabilities_.draw_and_swap_full_viewport_every_frame = true;
+}
+
+ParentOutputSurface::~ParentOutputSurface() {
+}
+
+void ParentOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
+ context_provider_->ContextGL()->ShallowFlushCHROMIUM();
+ client_->DidSwapBuffers();
+}
+
+void ParentOutputSurface::SetDrawConstraints(const gfx::Size& surface_size,
+ const gfx::Rect& clip) {
+ DCHECK(client_);
+ surface_size_ = surface_size;
+ SetNeedsRedrawRect(gfx::Rect(surface_size));
danakj 2014/05/21 15:45:39 Do you need this given the caps flag to draw the f
boliu 2014/05/21 15:54:16 Yes this is still needed. draw_and_swap_full_viewp
+ gfx::Transform identity;
+ gfx::Rect empty;
+ SetExternalDrawConstraints(identity, empty, clip, true);
+}
+
+} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698